I have two data.frames that I want to merge together. The first is:
datess <- seq(as.Date(\'2005-01-01\'), as.Date(\'2009-12-31\'), \'days\') sample<-
You can use match
match
matched<-match(format(sample$Date,"%Y"),a$a) sample$y<-a$y[matched] sample$Z<-a$Z[matched]