Note that for this to work properly in the PEcAn.logger functions, you should always add the wrap = FALSE argument, and probably add a newline ("\n") before the output of this function.

print2string(x, ...)

Arguments

x

Object to print

...

Additional arguments to base::print().

Value

Output of print(x, ...), captured as string

Author

Alexey Shiklomanov

Examples

logger.info("First few rows of Iris:\n", print2string(iris[1:10, -5]), wrap = FALSE)
df <- data.frame(test = c("download", "process", "plot"), status = c(TRUE, TRUE, FALSE))
logger.debug("Current status:\n", print2string(df, row.names = FALSE), wrap = FALSE)