[R] "Denormalize" data

RobinLovelace rob00x at hotmail.com
Tue Aug 9 16:39:30 CEST 2011


Hi David Winsemius, thanks a lot for the answer that I finally spotted
amongst my verbose message.

Many thanks, and I see that it does work now: I had to change the variable
names of the subset HHum02
because all the rows from main dataset were still there invisibly (after I
used subset to remove them).
For this reason the xtabs solution did not appear to work. 

Having saved the output table, then loaded it again, the xtabs solution
works perfectly.

another solution (when HHum02 is replaced by Humn02) is:

mdata <- melt(Humn02)
Denormal <- cast(mdata, CASW~CO2Group~variable, sum)

Check out the power of the reshape package here: http://had.co.nz/reshape/

Many thanks again,

Robin 

--
View this message in context: http://r.789695.n4.nabble.com/Denormalize-data-tp3729817p3730137.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list