print_stat: Debugging statistics (vector, matrix or dataframe)

View source: R/utils.R

print_statR Documentation

Description

Mostly a debugging function that will print some summary statistics about a numeric vector, matrix or dataframe.

Usage

print_stat(msg, data, round_val = 2, msg_type = c("INFO", "DEBUG", "WARNING"))

Arguments

msg

The message to users.

data

The vector (numeric) for which the stats are to be produced (a vector, )

round_val

Round the values in its first argument to the specified number of decimal. Set argument to -1 for no rounding

msg_type

The type of message, one of "INFO", "DEBUG", or "WARNING"

Value

None

Examples

opt_warn <- options()$warn
print_stat("My data", 1:10, msg_type="INFO")
set_verbosity(3)
print_stat("My data", matrix(rnorm(10), nc=2), msg_type="DEBUG")
set_verbosity(0)
print_stat("My data", matrix(rnorm(10), nc=2), msg_type="DEBUG")

dputhier/scigenex documentation built on May 31, 2024, 8:59 a.m.