Entering edit mode
7 weeks ago
Andrea ▴ 10
I'm trying to use metaboanalyst package, 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?
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
It is related to your .csv file, however we do not know what does it look like. Check that this file is correctly formatted by comparing it with test datasets : https://www.metaboanalyst.ca/docs/Format.xhtml
Thank you. I've check it and it seems correctly formatted. I've also created a very small csv table from scratch just to check, but I've got the same problem. Could it be due to some dependencies?
I'll also try with one of the file downloaded from the site.
If you can share your small .csv table example, we would be happy to help you
Here the link to the file: https://www.dropbox.com/s/w1t954eaxqej6i1/Prova_metab.csv?dl=0
I've also tried with a file downloaded from the Metaboanalyst file, but I had the same error
I have no error after downloading your file and running your code, maybe you need to update your package ?
Yeah, I think so, but I don't know what I must update. I've installed R and the package on a new ubuntu machine two weeks ago. Thank you for the help