file_checks | R Documentation |
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.
check_file_width(path, max_file_width = gco("max_file_width"))
check_file_length(path, max_file_length = gco("max_file_length"))
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 |
In case of a fail all file_checks
throw
a
condition of class c("cleanr", "error", "condition").
Invisibly
TRUE
,
but see Details.
Other check functions:
function_checks
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.