It is correct and will produce a data.frame. But I guess the result is not
what you intend since the resulting data.frame nothing but NA and Samples
in the diagonal:
df1 <- data.frame(x = letters[1:5], y = letters[6:10])
reshape2::dcast(df1, x ~ y)
You are missing values somewhere. If you want
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
1ABL2 WT_10T
2ABL2 WT_6T
3 ADGRA2 HB_8R
4AFF4 EWS_13R
and
2 matches
Mail list logo