check_rd: Check each .Rd file on spelling errors.

Description Usage Arguments Details Value See Also

Description

check_rd checks each .Rd generated file in folder /man on typos and spelling errors.

Usage

1
check_rd(pkg_dir = getwd())

Arguments

pkg_dir

a character vector of length one, specifying the location of a package. The default value is the working directory (getwd). Missing value will be ignored. The folder must contain a folder /man and /R.

Details

This function goes through each file in folder /man, which has extension .Rd and checks for a wrong spelling. Only limited set of sections supported: title, description, details, parameters, and return. If the section is missing, the function throws an massage. Custom sections are not supported, due to limitations of package Rd2roxygen. The function uses hunspell package to find typos. Instead of indicating the location of the typo in .Rd file, the function seeks for the .R file in folder /R, which generated the .Rd file, and returns the line of the roxygen2 comment, which generates such an error.

Value

A data.frame with columns: File, Line, Word. The File is .R file, which generated correspondent .Rd file with an error, Line is the number of the line, where the error appears, and Word is the word with error.

See Also

check_pkg, check_desc


irudnyts/pkgspell documentation built on May 18, 2019, 5:49 a.m.