Closed ratleyge closed 1 year ago
To fix, the line of simpleAnnotation should be changed from:
if (queryadductlist == "all" & mode == "pos") {
to:
if (all(queryadductlist == "all") & mode == "pos") {
This also needs to be done for the next if statement:
if (all(queryadductlist == "all") & mode == "neg") {
I am able to run the function with this change.
Thanks. I didn't realize the issue in simpleAnnotation
function. It should be fixed now. Such error is generated due to the fact that if
statement will not accept vector in R 4.x version. If you are using R 3.x version, you might not have this error. Anyway, such issue should be fixed now and let me know if you have other issue.
Ah that makes sense. Thank you so much!
Hi, Thank you so much for putting xMSAnnotator on GitHub. I am trying to run HMDB.Annotation with adducts c("M+2H", "M+Na", "M+H") keep getting the error:
Error in if (queryadductlist == "all" & mode == "pos") {: the condition has length >1
Basically I receive this error any time I try to use adducts other than "all". Even the default settings return this error. I have been able to run the code before, but recently updated my version of R and something seems to have broken. I hope this is enough information, but I am happy to provide more as needed. Thank you for your help in advance!