report: Reporter Functions

Description Usage Arguments Details Value Examples

Description

Wrappers to log various things
* report_function_name() logs function name at the INFO level
* report_args() logs function arguments at the DEBUG level
* report_dim() logs data frame dimensions before and after function at the INFO level
* report_na() logs number of na per column of the data frame at the DEBUG level

Usage

1
2
3
4
5
6
7

Arguments

func

function

Details

report_dim()'s function must take a data.frame as the first argument and return a data.frame

Value

function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
start_logging()

this_is_a_function <- report_function_name(function(x) "Hi, I'm a function")
this_is_a_function()

my_function <- report_args(function(x, y, z) "Hi, I'm a function")
my_function(x = 1:5, y = list(a = letters[1:3], b = 'b'), z = head(iris))

head2 <- report_dim(head)
head2(mtcars)

jennguyen1/scriptR documentation built on May 29, 2019, 1:05 a.m.