check_package_naming: Classify the format of a package's name

Description Usage Arguments Value Examples

Description

Package names come likethis and like.this and Like.THIS and in a whole host of formats. check_package_naming consumes package metadata and identifies the format a package's name follows, using the convention described below.

Usage

1
check_package_naming(package_metadata)

Arguments

package_metadata

package metadata retrieved with get_package_metadata, or the name of a package (in which case get_package_metadata will be called internally).

Value

a named, two-element list containing casing ("Lower", "Upper" or "Mixed") and alphanumeric (TRUE for package names that exclusively contain alphanumeric characters, and FALSE for package names that contain special characters.)

Examples

1
2
3
4
5
6
# Identify if dplyr is all lower-case (yep) and only contains alphanumeric
# characters (also yep)
check_package_naming(get_package_metadata("ggplot2"))

# gridExtra, not so much
check_package_naming(get_package_metadata("gridExtra"))

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