malucalle / selbal

selbal: selection of balances for microbial signatures
32 stars 15 forks source link

Error in { : task 1 failed - "incorrect number of dimensions” #17

Closed johannesbjork closed 4 years ago

johannesbjork commented 4 years ago

I'm trying to run selbal on a dataset agglomerated to the genus level. Below follow the data dimensions. Furthermore, there are no missing values in covariates or response.

>dim(x)
[1] 227  79
>length(y)
[1] 227
> levels(y)
[1] "No"  "Yes"
length(z)
[1] 227
>levels(z)
[1] "A" "B" "C" "D"
CV.BAL.dic <- selbal.cv(x = x, y = y, n.fold = 5, n.iter = 10,
+                         covar = z, logit.acc = "AUC")

############################################################### 
 STARTING selbal.cv FUNCTION 
###############################################################

#-------------------------------------------------------------# 
# ZERO REPLACEMENT . . .

, . . . FINISHED. 
#-------------------------------------------------------------#

#-------------------------------------------------------------# 
# Starting the cross - validation procedure . . .Error in { : task 1 failed - "incorrect number of dimensions”
johannesbjork commented 4 years ago

Silly mistake: z has to be a data.frame and not a vector