0

I am using RStudio to build a R package. I am able to create a New Project -> R package -> Package name and add R files. This then creates all the appropriate folders with the R files and the .Rd files in the man folder.

I want to know how I can add 1) new R files to the package and 2) recreate the package with the new .Rd files.

I find there is no option to refresh the workspace with new files. I have been creating new packages with the new files and then copying over the R & .Rd files to the original project.

Is there a way. Do let me know

Thanks

Tinniam V. Ganesh
  • 1,979
  • 6
  • 26
  • 51

1 Answers1

1
  1. You can create .R files manually and save them in folder called R in the main directory of your package (e.g., my-package/R).
  2. Use roxygen2 package to create .Rd files and other documentation.

You may find helpful information how to create R packages here: R packages by Hadley Wickham

GegznaV
  • 4,938
  • 4
  • 23
  • 43