R/message_dt.R
message_dt.RdA thin wrapper around `print.data.table` that captures the printed representation of `x` and emits it with `message()` instead of writing to standard output. This is useful for reporting tabular information (e.g. diagnostics or warnings) through R's condition system so it can be suppressed, caught, or redirected like other messages. `before` and `after` allow adding explanatory text around the printed table.
message_dt(x, ..., before, after, sep = "\n")a data.table or something to be converted to a data.table.
passed to print.data.table.
optional text (character string) to prepend before the printed table in the message.
optional text (character string) to append after the printed table in the message.
separator (character string) used to join `before`, the printed table, and `after`. Default is `"\n"`.
defaults arguments to print.data.table (in addition to `x=dt` which cannot be overwritten) are `class=FALSE`, `print.keys=FALSE`, `row.names=FALSE`.