Hadlay,
About your original idea of putting it into a single command, I have two
additional points.
1) Maybe your suggestion of
cross_join(a, b, filter = a.mydate > b.mydate)
can first be implemented for the SQL backend only, and later for
data.frame and data.table. This would be relatively easy to do (I hope),
since it already works in SQL, so it would "only" be a matter of
translating it to an SQL command.
2) I was thinking more of an extension of the existing *_joins, since
for example my SQL code in my earlier post is an inner join, not a cross
join. For example, add a new argument, say, `on` and then use it for
example like
inner_join(a, b, on = a.mydate > b.mydate & a.mydate <= b.mydate + 14)
This way people could still use the `by` argument in the usual way, but
for more complicated joins they could use `on`.