Browse code

Update rankingDifferentMeans.R

Ellis Patrick authored on 18/08/2022 04:35:55 • GitHub committed on 18/08/2022 04:35:55
Showing 1 changed files

... ...
@@ -14,10 +14,9 @@ differentMeansRanking <- function(measurementsTrain, classesTrain, verbose = 3)
14 14
   
15 15
   # Data is required to be in traditional bioinformatics format - features in rows
16 16
   # and samples in columns and also must be a matrix, not another kind of rectangular data.
17
-  measurementsTrain <- t(as.matrix(measurementsTrain))
17
+  measurementsMatrix <- t(as.matrix(measurementsTrain[, !categorical, drop = FALSE]))
18 18
   if(any(!categorical))
19 19
   {
20
-    measurementsMatrix <- measurementsTrain[!categorical, , drop = FALSE]
21 20
     if(length(levels(classesTrain)) == 2)
22 21
     {
23 22
       if(verbose == 3)
... ...
@@ -32,4 +31,4 @@ differentMeansRanking <- function(measurementsTrain, classesTrain, verbose = 3)
32 31
   
33 32
   order(pValues) # From smallest to largest.
34 33
 }
35
-attr(differentMeansRanking, "name") <- "differentMeansRanking"
36 34
\ No newline at end of file
35
+attr(differentMeansRanking, "name") <- "differentMeansRanking"