When you see “R package,” you may think "Something to share with other people." But an R package can also be a good way to organize your own work just for yourself. And especially your future self.
R packages give you a consistent structure, so you're more likely to refactor code into functions. And, at least as important: Packages give you a consistent way to document each one of your functions. So, next year, there’s a better chance you’ll remember which parts of your code do what.
System setup
First, you want to set up your system. For easy package development, I suggest making sure you’ve got these libraries installed on your system: devtools, usethis, roxygen2, testthat, knitr, and rmarkdown.
To read this article in full, please click here