On Feb 18, 2012, at 8:35 AM, Adel ESSAFI wrote:
with simpler expressions:
if I have a dataframe
A B C
is it possible de transform it to a matrix where nrow(A) colomns,
nrow(B)
row and for each value of C, we put the corresponding value in the
matrix.
Perhaps:
xtabs(C ~ A + B, data=dfrm
Adel,
I don't fully understand your question. Please try to explain what you
want to do again.
In general to change a data frame to a matrix, all one needs to do is
use the as.matrix function.
# Create dataframe
mydataframe1 <- data.frame(x=1:3, y=10:12)
mydataframe1
class(mydataframe1)
# Conver
with simpler expressions:
if I have a dataframe
A B C
is it possible de transform it to a matrix where nrow(A) colomns, nrow(B)
row and for each value of C, we put the corresponding value in the matrix.
Regards
Le 18 février 2012 13:57, Adel ESSAFI a écrit :
> Hello
>
> > orderulcount
>Gr
Hello
> orderulcount
Group.1 Group.2 Group.3 xV5
7C L 0.0 30 C / L
19 C L 0.2 27 C / L
31 C L 0.4 15 C / L
43 C L 0.6 7 C / L
54 C L 0.8 2 C / L
10 C S 0.0 27 C / S
22 C S 0.
4 matches
Mail list logo