Maintainer
Maintainer: John Muschelli <[email protected]>
I am explicit about Maintainer because some people use that field as some parsers use Author and not Authors@R.
I use RStudio. I do File → New Project → New Directory → R Package and I make sure “Create a git repository” is clicked. I don’t use packrat for my packages, so that is not clicked.
Things to do:
R/hello.R
man/hello.Rd
Build → Configure Build Tools → Generate Documentation with Roxygen, make sure that’s clicked. I click Vignettes and Build and Reload.--as-cran under the “Check options” in Build → Configure Build Tools.NAMESPACE file. If building fails, add an empty file with # Generated by roxygen2: do not edit by hand at the top and rerun.Maintainer: John Muschelli <[email protected]>
I am explicit about Maintainer because some people use that field as some parsers use Author and not Authors@R.
I run the short version of the code on http://johnmuschelli.com/neuroc/getting_ready_for_submission/index.html, which essentially to run (in R):
usethis::use_git()
usethis::use_github() # must have GITHUB_PAT set up
usethis::use_readme_md()
usethis::use_vignette("my-vignette")
usethis::use_testthat()
usethis::use_appveyor()
usethis::use_travis()And edit the following files:
.travis.yml
Add the following lines:
warnings_are_errors: true
after_success:
- Rscript -e 'covr::coveralls(type = "all")'
to .travis.yml.
README.md
Add the following lines, changing GITHUB_USERNAME/REPO to the correct version
[![Travis-CI Build Status] (https://travis-ci.org/GITHUB_USERNAME/REPO.svg?branch=master)] (https://travis-ci.org/GITHUB_USERNAME/REPO)
[](https://ci.appveyor.com/project/GITHUB_USERNAME/REPO)
to the README.md.
I tend to add to the README.md an installation script (using remotes or devtools) :
## Installation
To install the package, please run:
```r
remotes::install_github("GITHUB_USERNAME/REPO")
```
I grab my Description field from DESCRIPTION file and add The package DESCRIPTION_FIELD_HERE in README.md