Add trivial implementation of R (replace mode).