[R] data
sonchawan tamkaew
psu17772 at hotmail.com
Mon Apr 29 18:46:03 CEST 2002
Hello,
Suppose I have a matrix with 1000 rows and 3 columns, 1st column date, 2nd
one is type, 3rd one is yield. So it looks like this.
date type yield
01/01/01 A 3.4
01/01/01 B 3.2
01/01/01 C 1.8
02/01/01 B 3.3
03/01/01 A 3.3
03/01/01 B 3.4
04/01/01 A 3.5
... . ...
... . ...
I would like to have the data look like this instead.
date A B C
01/01/01 3.4 3.2 1.8
02/01/01 3.3
03/01/01 3.3 3.4
04/01/01 3.5
The missing values could be either blank or NA.
How could I do this without writing for/if loop or do it in Excel before?
Thank you very much in advance.
Sonchawan
_________________________________________________________________
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list