Joining two dataframes of different length with different values

So basically I have two dataframes with similar data. They both have a time stamp, although one is at higher temporal resolution. To be clear, the values from one set increment by 1s, while the other set increments by .001s.
df1 = data.frame( seq(from = 0, to =10, by = 1) )
df2 = data.frame( seq(from = 0, to =10, by = 0.001) )

I thought I could filter out the rows that don't exist in df1 from df2 by using %in%
df2 = df2[df2[1] %in% df1[1],]

but it is returning an empty data frame

Is there an easy solution to this?

Are you after something like an inner join?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.