1. Create the prerequisites: To create R packages using RStudio, you must have the following prerequisites: P, RStudio, Rtools, Basic MikTex, roxygen2 and devtools.
2. Create an RPackage project in RStudio and add all your R files (init.r, auth.r, class.r, modules / status.r, modules / mgmt.r, modules / core.r, modules / mcf.r) in the R folder of the project.
3. Add documentation by editing the package description file. Create a project, and now your package is ready to use.
to create a simple package will take no more than 15 minutes. If you want to explain step by step how to create a simple package, visit this blog. https://veeramaninatarajanmca.wordpress.com/2017/02/10/how-to-create-a-simple-package-in-r-using-rstudio/
source share