On Jun 1, 2012, at 4:08 PM, David Winsemius wrote:


On Jun 1, 2012, at 12:27 PM, pigpigmeow wrote:

Dear all,
I have a lot of problems on R-programming.
for example my csv. file is ..

That certainly does not look like any csv file I have ever seen.

Date                  wrfRH wrfsolar wrfwindspeed wrfrain wrftd wrfta
21/10/2010 92.97 22.11 53.27 0 1546.337861 61.00852664


i calculate the ratio of wrfRH/wrfsolar for each day.


If you are confused in your terminology, and you really have a data.frame created by read.table, then adding a column to an existing data.frame , say the ratio of wrftd divided by wrfta, is really simple:

dfrm$ratio <- with dfrm, wrftd/wrfta)

And that of course should have been :

dfrm$ratio <- with( dfrm, wrftd/wrfta)

--

David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to