[R] using "dcast" function ?

Bogdan Tanasa tanasa at gmail.com
Fri May 26 11:25:53 CEST 2017


Dear all, I would like to double-check with you please the use of "acast"
or "dcast" function from "reshape2"package.

I am starting with a data frame Y of GENES and SAMPLES,eg :

  Cancer_Gene     Sample
1        ABL2  WT_10T
2        ABL2   WT_6T
3      ADGRA2   HB_8R
4        AFF4 EWS_13R

and I would like to have a dataframe/matrix of CANCER_GENES * SAMPLES.

Shall I do " dcast(Y, Cancer_Gene ~ Sample)", would it be correct ? thank
you !

-- bogdan

	[[alternative HTML version deleted]]



More information about the R-help mailing list