[R] Re: R-help Digest, Vol 28, Issue 6
Sebastian Schoenherr
csad4933 at uibk.ac.at
Mon Jun 6 15:34:16 CEST 2005
Dear all,
i have a question as regards to the read.table /table command:
I read in the following file:
Method1 23
Method2 12
Method3 43
Method4 76
Method1 2
Method3 4
If i use the "table" command I get the following matrix:
V2
V1 2 4 12 23 43 76
Method1 1 0 0 1 0 0
Method2 0 0 1 0 0 0
Method3 0 1 0 0 1 0
Method4 0 0 0 0 0 1
Is it possible that R groups my values, to get an matrix which looks nearly
like this:
V1
Method1 23 2
Method2 12 0
Method3 43 4
Method4 76 0
Some ideas?
Thanks in advance
Cheers
Sebastian
More information about the R-help
mailing list