Convert data format for R package Mfuzz -
i have dataframe called mydf
containing 4 different columns. want convert format accepted mfuzz
package generate cluster. want see cluster of sample1
, sample2
, sample3
. how convert mydf format used in mfuzz
?
mydf s. no sample1 sample2 sample3 1 0.003 0.9 11.3 2 0.003 1.9 33.3 3 0.004 2.9 3.4 4 0.005 2.0 44.4 5 0.004 2.3 43.4
i hope little example helpful
set.seed(42) mydf = data.frame(a=rnorm(10),b=runif(10),c=rpois(10,l=1)) test = new('expressionset', exprs=mydf) # fails test = new('expressionset', exprs=as.matrix(mydf)) # works t.cl = mfuzz(test,c=3,m=1.25) mfuzz.plot(set,cl=t.cl, mfrow=c(2,2))
Comments
Post a Comment