Conditional operation on multiple columns from two data frames
The suggestion below was made. df1$Date <- as.Date(df1$Date) df2$Date <- as.Date(df2$Date) ifelse(df1$ID==df2$ID & df1$Date-df2$Date<0.5,df1$y-df2$y, NA) However, because my dataframe rows do not align, I need the conditionals to be tested on every combination of cells. I'm starting to think I need to use tapply? Tim
View this message in context: http://www.nabble.com/Conditional-operation-on-multiple-columns-from-two-data-frames-tp21189891p21197566.html Sent from the R help mailing list archive at Nabble.com.