The best way to author R packages will be using devtools.
create() - Creates a package
document("path/to/package") - Reads roxygen tags and creates documentation
doc_check() checks docs for errors
check() - To run package checks
Reference: http://r-pkgs.had.co.nz/