An initial version of an R wrapper.