WIP code generation in R (issue #628)