Learn R Programming

cleanr (version 1.1.3)

check_function_layout: Check a Function's Layout

Description

Run all function_checks on a function.

Usage

check_function_layout(object, function_name = NULL, max_lines_of_code = get_cleanr_options("max_lines_of_code"), max_lines = get_cleanr_options("max_lines"), max_num_arguments = get_cleanr_options("max_num_arguments"), max_nesting_depth = get_cleanr_options("max_nesting_depth"), max_line_width = get_cleanr_options("max_line_width"), check_return = get_cleanr_options("check_return"))

Arguments

object
The function to be checked.
function_name
The name to be used for reporting. If NULL, it is substituted from the object given. Argument is mainly there to pass name for functions retrieved via get in the wrapper function check_functions_in_file.
max_lines_of_code
max_lines
max_num_arguments
max_nesting_depth
max_line_width
check_return

Value

invisible(TRUE), but see Details.

Details

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

Examples

Run this code
print(check_function_layout(check_num_lines))

Run the code above in your browser using DataLab