Hi,
I am a beginner in R script, my code is like below. But there is an error in openMSfile(mzml) : 'filename' has to be of length 1, I don't know what does this mean an how to fix it? Thanks
It means you can only read one file at a time. I suggest you use switch to the MSnbase package instead of mzR. You can use the readMSData to load many files at once.
Hi, I am a beginner in R script, my code is like below. But there is an error in openMSfile(mzml) : 'filename' has to be of length 1, I don't know what does this mean an how to fix it? Thanks
filepath <- system.file("A3.mzML", package = "msdata") mzml <- list.files(filepath, pattern="A3.mzML", full.names=TRUE, recursive = TRUE) mz <- openMSfile(mzml)