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.

______________________________________________
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