How to create an R package

# install devtools
install.packages("devtools")
 
# create a template in package/
usethis::create_package("package")