Learn R Programming

cleanr (version 1.1.3)

check_directory: Check a Directory

Description

Run check_file on files in a directory.

Usage

check_directory(path, pattern = "\\.[rR]$", recursive = FALSE, ...)

Arguments

path
Path to the directory to be checked.
pattern
A pattern to search files with, see list.files.
recursive
Search the directory recursively? Passed to list.files.
...
Arguments to be passed to check_file.

Value

invisible(TRUE), but see Details.

Details

The function catches the messages of "cleanr"-conditions thrown by check_file and, if it caught any, throws them.

Examples

Run this code
# load internal functions first.
load_internal_functions("cleanr")
print(check_directory(system.file("source", "R", package = "cleanr"),
                      max_num_arguments = 8, max_file_width = 90,
                      check_return = FALSE))

Run the code above in your browser using DataLab