I need to merge two dataframes by two columns (participant and time) where time matches may be near, not exact (plus/minus 0.001). Below are two sample dataframes where the first three times are near matches and the others exact. Fuzzy_join in general doesn't work because these are large dataframes...
df1 <- data.frame("participant" = c("1", "1", "1", "1", "1", "1", "1", "1",
"2", "2", "2", "2", "2", "2", "2", "2"),
"item" = c("a", "b", "c", "d", "e", "f", "g", "h",
"i", "j", "k", "l", "m", "n", "o", "p"),
"time" = c("43.565", "54.125", "65.923", "73.858", "111.123", "143.124", "255.500", "255.502",
"300.595", "350.252", "400.600", "511.122", "525.887", "577.752", "599.129", "601.992"))
df2 <- data.frame("participant" = c("1", "1", "1", "1", "1", "1", "1", "1",
"2", "2", "2", "2", "2", "2", "2", "2"),
"value" = c("xyz", "hlm", "test", "nop", "test", "nop", "hlm", "test",
"hlm", "test", "xyz", "xyz", "test", "xyz", "nop", "xyz"),
"time" = c("43.566", "54.124", "65.922", "73.858", "111.123", "143.124", "255.500", "255.502",
"300.595", "350.252", "400.600", "511.122", "525.887", "577.752", "599.129", "601.992"))