Description Usage Arguments Examples
A pipeable function for logging. The first argument is passed through the function unchanged, allowing loggr to be used
1 2 |
x |
An object. |
... |
Expressions to be logged. |
.flags |
A character vector. These flags are added to the logging statement. loggr_flags can be used to set this variable globally |
.level |
A integer. Specifies the importance of log. loggr_level sets the global importance level.Only statements with a level above the global level are logged |
.file |
A character string or a file connection. If NULL, statements are printed to standard output connection |
.timestamp |
A boolean. Whether to include a timestamp in the logging statement. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | iris_filtered = iris %>%
loggr("I see you have, nrow(.), "rows") %>%
filter(Species == "setosa") %>%
loggr("And now you have, nrow(.), "rows")
x = rnorm(100) %>%
loggr(length(.), "samples drawn", .flags=c("flag1", "flag2")) %>%
loggr_level(5)
y = x %>%
loggr("This log isn't so important", .level = 1) %>%
max %>%
loggr("But maybe this one is", .level = 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.