[R] copy values from one dataframes into another
D Sonderegger
derek.sonderegger at gmail.com
Wed Feb 23 23:59:24 CET 2011
What you want to do is create a new dataframe that includes all the years.
> newdata <- data.frame( Year=1981:1988 )
> merge(fire, newdata, all=TRUE)
If you don't include the all=TRUE, then you only get the rows that are
contained in both datasets.
--
View this message in context: http://r.789695.n4.nabble.com/copy-values-from-one-dataframes-into-another-tp3321805p3321849.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list