PTFM-2681: Initial implementation of R API wrappers