Error in MetaboanalystR

I was trying to understand the biomarker analysis using the web interface. I was able to look at the R codes and tried to replicate it in my pipeline. So the general idea as such to use different approach to assess if we get same metabolites that are enriched. However when generated , I encountered an error. I first thought it could be my data, so I used the data -plasma_nmr.csv. the Metaboanalyst analyzes this data beautifully and gives out the below code , however when I try in R, I get this error.

mSet<-PerformCV.explore(mSet, “pls”, “pls”, 2)

Error in loadNamespace(x) : there is no package called ‘pls’.

I get this while using you example data set

R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/Chicago
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] Rserve_1.8-11 randomForest_4.7-1.1 MetaboAnalystR_4.0.0

loaded via a namespace (and not attached):
[1] DBI_1.1.3 bitops_1.0-7 pROC_1.18.4 rlang_1.1.1
[5] magrittr_2.0.3 scrime_1.3.5 compiler_4.3.1 RSQLite_2.3.1
[9] vctrs_0.6.3 reshape2_1.4.4 stringr_1.5.0 pkgconfig_2.0.3
[13] fastmap_1.1.1 caTools_1.18.2 utf8_1.2.3 prodlim_2023.08.28
[17] purrr_1.0.2 bit_4.0.5 cachem_1.0.8 jsonlite_1.8.7
[21] recipes_1.0.8 blob_1.2.4 BiocParallel_1.34.2 parallel_4.3.1
[25] R6_2.5.1 stringi_1.7.12 RColorBrewer_1.1-3 qs_0.25.5
[29] limma_3.56.2 parallelly_1.36.0 rpart_4.1.21 lubridate_1.9.3
[33] Rcpp_1.0.11 iterators_1.0.14 future.apply_1.11.0 Matrix_1.6-1.1
[37] splines_4.3.1 nnet_7.3-19 igraph_1.5.1 timechange_0.2.0
[41] tidyselect_1.2.0 rstudioapi_0.15.0 stringfish_0.15.8 siggenes_1.74.0
[45] timeDate_4022.108 gplots_3.1.3 codetools_0.2-19 listenv_0.9.0
[49] lattice_0.21-9 tibble_3.2.1 plyr_1.8.9 Biobase_2.60.0
[53] withr_2.5.1 future_1.33.0 survival_3.5-7 RcppParallel_5.1.7
[57] pillar_1.9.0 KernSmooth_2.23-22 foreach_1.5.2 stats4_4.3.1
[61] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.4 munsell_0.5.0
[65] scales_1.2.1 RApiSerialize_0.1.2 gtools_3.9.4 globals_0.16.2
[69] class_7.3-22 glue_1.6.2 lazyeval_0.2.2 tools_4.3.1
[73] data.table_1.14.8 ModelMetrics_1.2.2.2 fgsea_1.26.0 gower_1.0.1
[77] locfit_1.5-9.8 fastmatch_1.1-4 cowplot_1.1.1 grid_4.3.1
[81] Cairo_1.6-1 impute_1.74.1 tidyr_1.3.0 ipred_0.9-14
[85] edgeR_3.42.4 colorspace_2.1-0 nlme_3.1-163 crmn_0.0.21
[89] cli_3.6.1 fansi_1.0.4 viridisLite_0.4.2 lava_1.7.2.1
[93] dplyr_1.1.3 glasso_1.11 pcaMethods_1.92.0 gtable_0.3.4
[97] digest_0.6.33 BiocGenerics_0.46.0 caret_6.0-94 htmlwidgets_1.6.2
[101] memoise_2.0.1 htmltools_0.5.6.1 multtest_2.56.0 lifecycle_1.0.3
[105] httr_1.4.7 hardhat_1.3.0 bit64_4.0.5 MASS_7.3-60

“… Error in loadNamespace(x) : there is no package called ‘pls’ …” Have you tried to install the ‘pls’ package?