Open AlessandroLazzaro opened 4 years ago
Hi @AlessandroLazzaro !
First of all thank you for using selbal
. I am sorry, but it is difficult to know where the problem is by only reading the error message.
Did you run the examples in (https://htmlpreview.github.io/?https://github.com/UVic-omics/selbal/blob/master/vignettes/vignette.html) without error messages?
Is your response variable a factor or numeric? Try to check that RStudio understands them as they are suppose to be.
Let's see if step by step we can find the issue.
Thank you for your answer!
Hello, I would like to use selbal yo analyse my microbiome data. I created a dataset with only only the taxa of interest (only taxa present in more than 20% of the samples have been included), a column for a dichotomic variable (y) and another column containing dichitomic values too, to use as covariate. Unfortunately, running the command I obain this error. I tried to change the zero.rep parameter, but it is the same with both "one" or "bayes". I am sure that there aren't missing value in my dataset. I also tried to modify the zero in 1 out of RStudio and than to import the file without zeros, but the error provided was the same:
Error in learnmatrix[j + (i - 1) * fold, 1:length(whichj)] <- whichj : replacement has length zero In addition: Warning messages: 1: In if (classy == "factor") { : the condition has length > 1 and only the first element will be used 2: In if (strat & missing(y)) stop("If 'strat=TRUE', 'y' (class memberships) must be given \n") : the condition has length > 1 and only the first element will be used 3: In if (!strat) { : the condition has length > 1 and only the first element will be used
thank you for your help