Error received in ropls package
1
0
Entering edit mode
@82b19035
Last seen 15 months ago
Ireland

I am trying to run the ropls packahe but get this error even with the sample data. Can you let me know how to resolve this error?

Code should be placed in three backticks as shown below


>sacurine.oplsda <- opls(dataMatrix, genderFc, predI = 1, orthoI = NA, subset = "odd")
trainVi <- sacurine.oplsda[["subset"]]
Error in sacurine.oplsda[["subset"]] : this S4 class is not subsettable

sessionInfo( )
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=es_ES.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=es_ES.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=es_ES.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] ropls_1.28.2

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9                  XVector_0.36.0              GenomeInfoDb_1.32.4         pillar_1.8.1               
 [5] compiler_4.2.0              MatrixGenerics_1.8.1        zlibbioc_1.42.0             bitops_1.0-7               
 [9] base64enc_0.1-3             keras_2.9.0                 tools_4.2.0                 MultiDataSet_1.24.0        
[13] zeallot_0.1.0               jsonlite_1.8.3              lifecycle_1.0.3             tibble_3.1.8               
[17] lattice_0.20-45             pkgconfig_2.0.3             png_0.1-7                   rlang_1.0.6                
[21] Matrix_1.5-1                DelayedArray_0.22.0         cli_3.4.1                   DBI_1.1.3                  
[25] rstudioapi_0.14             qqman_0.1.8                 GenomeInfoDbData_1.2.8      dplyr_1.0.10               
[29] IRanges_2.30.1              S4Vectors_0.34.0            generics_0.1.3              vctrs_0.5.0                
[33] rappdirs_0.3.3              stats4_4.2.0                rprojroot_2.0.3             MultiAssayExperiment_1.22.0
[37] grid_4.2.0                  tidyselect_1.2.0            calibrate_1.7.7             reticulate_1.26            
[41] glue_1.6.2                  Biobase_2.56.0              here_1.0.1                  R6_2.5.1                   
[45] fansi_1.0.3                 limma_3.52.4                magrittr_2.0.3              whisker_0.4                
[49] MASS_7.3-58.1               matrixStats_0.62.0          tfruns_1.5.1                BiocGenerics_0.42.0        
[53] GenomicRanges_1.48.0        SummarizedExperiment_1.26.1 assertthat_0.2.1            tensorflow_2.9.0           
[57] utf8_1.2.2                  RCurl_1.98-1.9
Metabolomics ropls • 711 views
ADD COMMENT
0
Entering edit mode

What is your data and what do you want to do ?

ADD REPLY
0
Entering edit mode
@etiennethevenot-8285
Last seen 15 months ago
France

Hi, As described in the vignette, the correct command line to get the indices of the training samples is:

trainVi <- getSubsetVi(sacurine.oplsda)

Best, Etienne.

ADD COMMENT

Login before adding your answer.

Traffic: 867 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6