Learn R Programming

rcompendium (version 1.3)

refresh: Refresh a package/research compendium

Description

This function is about to be removed from rcompendium.

This function refreshes a package/research compendium. It will:

  • Update .Rd files and NAMESPACE by using devtools::document();

  • Update external packages (in DESCRIPTION file) by using add_dependencies();

  • Update badges in README.Rmd (if already present);

  • Re-knitr the README.Rmd by using rmarkdown::render();

  • Check package integrity by using devtools::check();

  • Run analysis by sourcing make.R (only for compendium).

Usage

refresh(compendium = NULL, make = FALSE, check = FALSE, quiet = FALSE)

Value

No return value.

Arguments

compendium

A character of length 1. The name of the folder to recursively detect dependencies to be added to the Imports field of DESCRIPTION file. It can be 'analysis/' (if additional folders, i.e. data/, outputs/, figures/, etc. have been created in this folder), '.' (if folders data/, outputs/, figures/, etc. have been created at the root of the project), etc. See new_compendium() for further information.

Default is compendium = NULL (i.e. no additional folder are inspected but R/, NAMESPACE, vignettes/, and tests/ are still inspected).

make

A logical value. If TRUE the Make-like R file make.R is sourced. Only for research compendium created with new_compendium(). Default is FALSE.

check

A logical value. If TRUE package integrity is checked using devtools::check(). Default is FALSE.

quiet

A logical value. If TRUE (default) message are deleted.

See Also

Other setup functions: new_compendium(), new_package(), set_credentials()

Examples

Run this code
if (FALSE) {
library(rcompendium)

## Create an R package ----
new_package()

## Start developing functions ----
## ...

## Update package (documentation, dependencies, README) ----
refresh()
}

Run the code above in your browser using DataLab