file_checks {cleanr} | R Documentation |
File Checks
Description
A set of tiny functions to check that files adhere to a layout style. A file should have a clear layout, it should
not have too many lines and
not have lines too wide.
Usage
check_file_width(path, max_file_width = gco("max_file_width"))
check_file_length(path, max_file_length = gco("max_file_length"))
Arguments
path |
Path to the file to be checked. |
max_file_width |
The maximum line width accepted.
Set (preferably via |
max_file_length |
The maximum number of lines accepted.
Set (preferably via |
Details
In case of a fail all file_checks
throw
a
condition of class c("cleanr", "error", "condition").
Value
Invisibly
TRUE
,
but see Details.
See Also
Other check functions:
function_checks
Examples
print(cleanr::check_file_width(system.file("source", "R", "checks.R",
package = "cleanr")))
print(cleanr::check_file_length(system.file("source", "R", "checks.R",
package = "cleanr"),
max_file_length = 300))
[Package cleanr version 1.4.0 Index]