xia-lab / MetaboAnalystR

R package for MetaboAnalyst
Other
318 stars 157 forks source link

Error in file import #258

Open AndreaGhiroldi opened 1 year ago

AndreaGhiroldi commented 1 year ago

Hi,

I'm trying to use metaboanalyst, but I'm encountering a problem in the data file loading. I have a csv file with samples in rows and predictors in column. When I use the Read.TextData I get the "Error: $ operator is invalid for atomic vectors". How can I solve the issue? Thank you

mSet<-InitDataObjects("conc", "roc", FALSE)

load data file (samples in rows, predictors in columns, second column = disease phenotype)

mSet<-Read.TextData(mSet, File.csv, "rowu", "disc")

Error: $ operator is invalid for atomic vectors

jessieolough commented 1 year ago

Hi! Have you tried uploading and processing your data with the MetaboAnalyst website and then copying the R code it gives you, which you can then use in your own RStudio environment?