I doubt that a purely R based solution is feasible.
IMHO the cleanest solution of the SCD2 issue is doing UPSERT (insert ... on conflict update), which is a part of SQL that has so far resisted standardization. Any solution is bound to be very platform specific.
It is best left to the backend, and by extension database people.