check_practices: Check all the practices of a package on CRAN

Description Usage Arguments Details Value Examples

Description

Given the name of a package on CRAN, retrieve the source and. Then run all tests in the practice package, returning a one-row data frame with information on the package.

Usage

1
2
check_practices(package_name, metadata_lst = NULL, src_dir = NULL,
  error = TRUE)

Arguments

package_name

character vector with the names of one or more packages on CRAN

metadata_lst

List of package metadata objects

src_dir

If given, a directory that holds sources of the packages

error

whether the function should raise an error if any individual package does. If FALSE, shows the error message but continues

Details

This relies entirely on other functions in the practice package.

Value

A tbl_df with one row for each package, and columns describing the practices followed by each.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
check_practices("urltools")

# check multiple packages
practices <- check_practices(c("urltools", "ggplot2", "dplyr", "survival"))
practices

# extract what packages each links to
library(dplyr)
library(tidyr)

practices %>%
  select(package, links_to) %>%
  unnest(links_to)

## End(Not run)

Ironholds/practice documentation built on May 7, 2019, 6:41 a.m.