- Install latest version of R from CRAN
- Install latest version of RStudio Desktop from RStudio's web site
- Open RStudio
- Install
devtools
package (may take a few minutes) or update packages - Install
roxygen2
package - Click on Project ---> New Project… ---> New Directory
- Click on "R Package using devtools" (you may need to scroll down in the menu)
- Enter package name
- Verify that project subdirectory path does not contain any spaces
- Click "Create Project"
- Delete the
NAMESPACE
file (you will useroxygen2
to auto-generate this file) - Click “Build” tab in environment browser
- Click More ---> “Configure Build Tools…”
- Check “Generate documentation with Roxygen” --> Click the "Configure..." button
- Check “Build & Reload” in the Roxygen Options —> Click OK
- Click OK in Project Build Tools Options