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.

______________________________________________
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