Create R factory function and update READMEs