Print

Print


I'm trying to train the classifier with a set of hand labeled subjects. Feature extraction appears successful and I have the "features.*" files for each subject.
When I run "fix -t MY_Train SomeMelodic1.ica path" I get a fatal error in fix_2a_train.R

> # select usign Kruskal test
> data.train.pval.vec <- apply(hcp.data[,-dim(hcp.data)[2]], 2, function(x){kruskal.test(x, as.numeric(hcp.data$class.labs))$p.value})
Error in kruskal.test.default(x, as.numeric(hcp.data$class.labs)) : 
  all observations are in the same group
Calls: apply -> FUN -> kruskal.test -> kruskal.test.default
Execution halted

The FIX package was downloaded 3 weeks ago. All R packages and dependencies installed successfully. I inserted print() statements in the script and included the output below. It shows that the number of levels is 2 so I'm confused as to why R is failing. What am I missing here?
Thanks

> print(dim(hcp.data[,-dim(hcp.data)[2]]))
[1]  75 172

> print(hcp.data$class.labs)
 [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 1 0
[39] 0 1 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 1 0 0 1 1 0
Levels: 0 1
> print(as.numeric(hcp.data$class.labs))
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 1 2 2 1
[39] 1 2 2 1 1 2 1 1 1 1 2 1 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1 2 1 1 2 2 1 1 2 2 1
            
> R --version
R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)