makeRpackage: makeRpackage

Description Usage Arguments Details Note Author(s) References Examples

View source: R/makeRpackage.R

Description

Automates most of the tasks associated with making an R package.

Usage

1
2
3
4
5
6
7
8
9
makeRpackage(
  source_dir,
  target_dir,
  dict_loc = "~/makeRpackage/inst/extdata/dictionary.R",
  package_desc = "This must end with a period.",
  repo_name = "https://cran.seoul.go.kr/",
  full_name = "Mark Bojack",
  email = "markbojack@outlook.com"
)

Arguments

source_dir

the full path of the source directory

target_dir

the full path of the target directory (should be in $HOME)

dict_loc

the full file path of the dictionary file, Default: '~/makeRpackage/inst/extdata/dictionary.R'

package_desc

description of the package which will be written in DESCRIPTION, Default: 'This must end with a period.'

repo_name

the preferred repo used to download R packages, Default: 'https://cran.seoul.go.kr/'

full_name

your full name, Default: 'Mark Bojack'

email

your email, Default: 'markbojack@outlook.com'

Details

This package more or less totally completes DESCRIPTION for you, also takes care of a lot of the other files not found in ./R. The coolest thing that it does is uses the sinew package to fill out most of the roxygen2 header, and also adds the necessary @importFrom tags for magrittr and data.table, other with other data.table code to prevent errors during devtools::check().

Note

target_dir should be in $HOME.

package_desc must end with a period.

Add entries into the custom dictionary file to automatically fill in @param.

Author(s)

Mark Bojack

References

R Bloggers
rdrr.io
Sinew GitHub

Examples

1
2
3
4
5
6
## Not run: 
if(interactive()){
  makeRpackage::makeRpackage('~/source', '~/target')
}

## End(Not run)

markbojack/makeRpackage documentation built on Jan. 27, 2022, 12:34 a.m.