check_roxygen: check whether a package's documentation uses roxygen2

Description Usage Arguments Details Value See Also Examples

Description

identifies if a package's documentation uses roxygen2's inline documentation, by scanning the R files hunting for roxygen2 tags.

Usage

1
check_roxygen(package_directory)

Arguments

package_directory

the full path to the directory, retrieved with get_package_source.

Details

checking for roxygen2 is fairly simple. One way is to look at the ./man files and search for the " tag, but early versions of roxygen2 didn't introduce that tag. Instead, we scan the .R files hunting for actual tags, specifically searching for @export (which every package, presumably, must have at least once - there wouldn't actually be any R it provides if not.)

Value

either TRUE or FALSE, depending on whether or not roxygen2 tags are found in the source code.

See Also

check_vignettes to identify if a package has vignettes and how they are built, check_changelog to see if there is something that looks like a changelog, and the package index for more tests and checks.

Examples

1
2
3
4
5
6
7
## Not run: 
#Identify if ggplot2 uses roxygen
file_location <- get_package_source("ggplot2")
check_roxygen(file_location)
remove_package_source(file_location)

## End(Not run)

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