How to add column to a longer data frame by using a conditional statement from a data frame that is shorter?

Viewed 12

So, basically I have two data frames that look something like this

tree_data <- data.frame(treeid=c(1,2,3,4,5,6,7,8,9,10),plotid=c(1,2,3))

census_data <- data.frame(plotid=c(1,2,3),censusdate=c(2000,2005,2010))

I would like to append the censudate column to tree_data based on the plotid.

0 Answers
Related