Hi, I am using bioconductor packages in R. I keep getting this error:
Error: could not find function "xcmsSet"
This is what I ran.
# load required libraries
library(xcms)
library(CAMERA)
# set nslaves for the number of available cores of your machine
# Follow xcms vignette to understand data structure
# http://www.bioconductor.org/packages/release/bioc/vignettes/xcms/inst/doc/xcmsPreprocess.pdf
nslaves <- 4
xset <- xcmsSet(
"C:/", method='centWave', ppm=2, peakwidth=c(10,50),
snthresh=3, prefilter=c(3,100), integrate=1, mzdiff=-0.00005,
verbose.columns=TRUE,fitgauss=FALSE, nSlaves=nslaves
)
# negative mode
xset2 <- xcmsSet(
"C:/", method='centWave', ppm=2, peakwidth=c(10,50),
snthresh=3, prefilter=c(3,100), integrate=1, mzdiff=-0.00005,
verbose.columns=TRUE,fitgauss=FALSE, nSlaves=nslaves
)
xcms is there in my win-library and all other bioconductor package neccesary. I also checked for xcmsSet in the unitTest folder of the xcms package. it is there as runit.xcmsSet.R.
I tried to load the library (xcms) alone. I get this error on mzR package:
> library(xcms)
Loading required package: mzR
Loading required package: Rcpp
Error : .onLoad failed in loadNamespace() for 'mzR', details:
call: value[[3L]](cond)
error: failed to load module Ramp from package mzR
invalid assignment for reference class field ‘class_pointer’, should be from class “externalptr” or a subclass (was class “character”)
In addition: Warning messages:
1: package ‘Rcpp’ was built under R version 3.0.3
2: In fun(libname, pkgname) :
mzR has been built against a different Rcpp version
than is installed on your system. This might lead to errors
when loading mzR. If you encounter such issues, please send
a report, including the output of sessionInfo() to the Bioc
mailing list -- http://www.bioconductor.org/help/mailing-list.
Error: package ‘mzR’ could not be loaded
I also see the packages Rcpp and mzR in my library. I have downloaded the latest zip ofr this package. No result.Pls Help
Thanks Johannes. I run R 3.0.1 now, when I started getting the error, I installed latest R 3.2.5 and I got same errors. so I simply removed the new version, believing versions were not the problem. When I shifted version, I copied every file within win-library to ensure my packages were still there. Anyway, sessionInfo()
Error: could not find function "xcmsSet"
> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_India.1252 LC_CTYPE=English_India.1252
[3] LC_MONETARY=English_India.1252 LC_NUMERIC=C
[5] LC_TIME=English_India.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] Biobase_2.30.0 BiocGenerics_0.16.1
I also tried the latest mzR and latest Rcpp al to no avail. I have also used earlier versions of Rcpp, then it will say Rcpp; could not be found by mzR':
> library(xcms)
Loading required package: mzR
Error: package ‘Rcpp’ required by ‘mzR’ could not be found
In addition: Warning message:
package ‘mzR’ was built under R version 3.2.3 .