Reputation: 23
I am calculating module preservation on R with WGCNA by following their tutorial, but I can't run the actual calculation, because it returns an error that it can only do it with numeric data. Sure enough, when I checked:
>is.numeric(datExprCTL)
[1] FALSE
>dim(datExprCTL)
[1] 185 2225
So I did the only thing I know to change it, but this is what happened:
>datExprCTL<-as.numeric(datExprCTL)
>dim(datExprCTL)
NULL
And when I run my module preservation script, it does say: Error in colSums(!is.na(datExpr[useSamples, useGenes])) : 'x' must be an array of at least two dimensions
So, my question is how can I convert to numeric without losing the dimensions and going ahead with module preservation, which needs to have the correct dimensions.
Upvotes: 0
Views: 228