PerformPSEA function issue in MetaboAnalystR

Dear Team,

I come again with a post on the PerformPSEA function used for MS peaks to paths analysis in MetaboanalystR.
As the problem I found has not been replied to because not enough information was provided by the respective person I guess, I try to provide it here. There is an error when running line with PerformPSEA function. Hope someone can help here?

Below the code, performed with the mummichog_ibd file from the Metaboanalyst website

library(“MetaboAnalystR”)

mSet<-InitDataObjects(“mass_all”, “mummichog”, FALSE)
mSet<-SetPeakFormat(mSet, “rmp”)
mSet<-UpdateInstrumentParameters(mSet, 5.0, “positive”, “yes”, 0.02);
mSet<-Read.PeakListData(mSet, filename=“https://www.metaboanalyst.ca/resources/data/mummichog_ibd.txt”);
mSet<-SanityCheckMummichogData(mSet)
mSet<-Setup.AdductData(mSet, add.vec);
mSet<-SetPeakEnrichMethod(mSet, “integ”, “v2”)
mSet<-SetMummichogPval(mSet, 0.1)
mSet<-PerformPSEA(mSet, “mmu_kegg”, “current”, permNum =100)
mSet<-PlotPSEAIntegPaths(mSet, “peaks_to_paths_”, “png”, 72, width=NA)

[1] “Got 4187 mass features.”
[1] “A total of 1939 of duplicates were merged.”
[1] “A total of 1653 of duplicates were merged.”
[1] “A total of 1939 of duplicates were merged.”
[1] “A total of 1939 of duplicates were merged.”
Error: ‘na.omit’ is not an exported object from ‘namespace:data.table’
In addition: Warning message:
In serialize(data, node$con) :
‘package:stats’ may not be available when loading

For R package troubleshooting, you need to provide your R environment (i.e. >sessionInfo()).

In addition, it seems to me that the error is related to the data.table package. Maybe you can try to reinstall this package first.

Dear Jeff,

Thanks for your response. I tried to reinstall the data.table package but it is still giving the same error. Please find here the sessionInfo:

sessionInfo(package=“MetaboAnalystR”)
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=German_Switzerland.utf8 LC_CTYPE=German_Switzerland.utf8 LC_MONETARY=German_Switzerland.utf8
[4] LC_NUMERIC=C LC_TIME=German_Switzerland.utf8

attached base packages:
character(0)

other attached packages:
[1] MetaboAnalystR_3.2.0

loaded via a namespace (and not attached):
[1] utils_4.2.1 nlme_3.1-157 bitops_1.0-7 lubridate_1.8.0 bit64_4.0.5
[6] httr_1.4.4 RColorBrewer_1.1-3 tools_4.2.1 utf8_1.2.2 R6_2.5.1
[11] rpart_4.1.16 KernSmooth_2.23-20 lazyeval_0.2.2 DBI_1.1.3 BiocGenerics_0.42.0
[16] colorspace_2.0-3 nnet_7.3-17 withr_2.5.0 tidyselect_1.2.0 gridExtra_2.3
[21] curl_4.3.2 bit_4.0.4 compiler_4.2.1 cli_3.4.1 Biobase_2.56.0
[26] Cairo_1.6-0 datasets_4.2.1 plotly_4.10.0 stringfish_0.15.7 base_4.2.1
[31] caTools_1.18.2 scales_1.2.1 stringr_1.4.1 digest_0.6.29 siggenes_1.70.0
[36] htmltools_0.5.3 pkgconfig_2.0.3 scrime_1.3.5 parallelly_1.32.1 fastmap_1.1.0
[41] limma_3.52.2 grDevices_4.2.1 htmlwidgets_1.5.4 rlang_1.0.6 rstudioapi_0.13
[46] RSQLite_2.2.18 impute_1.70.0 generics_0.1.3 RApiSerialize_0.1.2 jsonlite_1.8.3
[51] crmn_0.0.21 BiocParallel_1.30.3 gtools_3.9.3 ModelMetrics_1.2.2.2 dplyr_1.0.10
[56] magrittr_2.0.3 Matrix_1.4-1 Rcpp_1.0.9 munsell_0.5.0 fansi_1.0.3
[61] lifecycle_1.0.3 pROC_1.18.0 stringi_1.7.8 edgeR_3.38.4 MASS_7.3-57
[66] gplots_3.1.3 plyr_1.8.7 recipes_1.0.1 grid_4.2.1 blob_1.2.3
[71] parallel_4.2.1 listenv_0.8.0 methods_4.2.1 lattice_0.20-45 splines_4.2.1
[76] multtest_2.52.0 locfit_1.5-9.6 pillar_1.8.1 fgsea_1.22.0 igraph_1.3.5
[81] reshape2_1.4.4 future.apply_1.9.1 codetools_0.2-18 stats4_4.2.1 fastmatch_1.1-3
[86] glue_1.6.2 pcaMethods_1.88.0 data.table_1.14.4 RcppParallel_5.1.5 vctrs_0.4.1
[91] foreach_1.5.2 graphics_4.2.1 tidyr_1.2.1 gtable_0.3.1 purrr_0.3.4
[96] qs_0.25.4 future_1.28.0 assertthat_0.2.1 cachem_1.0.6 ggplot2_3.3.6
[101] gower_1.0.0 prodlim_2019.11.13 viridisLite_0.4.1 class_7.3-20 survival_3.3-1
[106] glasso_1.11 timeDate_4021.106 snow_0.4-4 tibble_3.1.8 iterators_1.0.14
[111] stats_4.2.1 memoise_2.0.1 hardhat_1.2.0 lava_1.7.0 globals_0.16.1
[116] caret_6.0-93 ipred_0.9-13

Thanks. This is informative: Running under: Windows 10 x64 (build 19045). We use Linux (or Mac) … may take longer to reproduce the issue in this case