Vignette: avoid "data" as object name
sneumann opened this issue · comments
Hi, a user reported that following the vignette https://www.bioconductor.org/packages/release/bioc/vignettes/xcms/inst/doc/xcms.html#21_Data_import
which is using data
leads to errors which I can reproduce:
data <- readMsExperiment(spectraFiles = cdfs, sampleData = pd)
...
> sampleData(data)
Error in sampleData(data) : inherits(object, "MsExperiment") is not TRUE
...
> data_3 <- data[3]
Error in data[3] : object of type 'closure' is not subsettable
To not suggest to users that using builtin function names is a good idea, we should avoid this.
Frankly, I have no idea why it does work in the vignette itself :-(
Yours, Steffen
good point. Do you have maybe a suggestion for an alternative name of the variable? maybe mse
? or lcms_data
? or faahko
?
Done.