[R] Adding a column into the file

pigpigmeow glorykwok at hotmail.com
Fri Jun 1 18:27:58 CEST 2012


Dear all,
I have a lot of problems on R-programming.
for example
my csv. file is ..
Date                  wrfRH wrfsolar wrfwindspeed wrfrain wrftd wrfta
21/10/2010 92.97 22.11 53.27 0 1546.337861 61.00852664
22/10/2010 87.35 21.99 40.89 0 1300.408288 62.85352227
23/10/2010 88.38 21.71 28.04 0.01 1381.768284 54.80594493
24/10/2010 92.32 15.45 22.38 0.51 1113.90981 39.46573663
25/10/2010 93.42 21.59 35.5 0.52 868.4895334 28.42952321
26/10/2010 93.38 20.15 42.58 0.07 1404.722837 40.29300856 
i calculate the ratio of wrfRH/wrfsolar for each day.

that is  
Date                  wrfRH wrfsolar wrfwindspeed wrfrain wrftd wrfta ratio
21/10/2010 92.97 22.11 53.27 0 1546.337861 61.00852664  XXXX
22/10/2010 87.35 21.99 40.89 0 1300.408288 62.85352227  YYYY
23/10/2010 88.38 21.71 28.04 0.01 1381.768284 54.80594493 ZZZZ
24/10/2010 92.32 15.45 22.38 0.51 1113.90981 39.46573663 AAAA
25/10/2010 93.42 21.59 35.5 0.52 868.4895334 28.42952321 BBBB
26/10/2010 93.38 20.15 42.58 0.07 1404.722837 40.29300856  CCCC

how to add new column in the original file ? Anyone can help me?!

--
View this message in context: http://r.789695.n4.nabble.com/Adding-a-column-into-the-file-tp4632093.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list