plotbiomes
plotbiomes copied to clipboard
use deparse-substitute in the validation helper functions
For example in get_outliers.R, at .validate_tp instead of
stop(
"\n
'tp' is not a 'matrix', 'data.frame' or 'data.table'"
)
use
stop( deparse(substitute(tp)), " is not a 'matrix', 'data.frame' or 'data.table'" )
Or cli since it's already imported by ggplot2 E.g.:
cli::cli_abort("{tp} is not a {.cls matrix}, {.cls data.frame}, or {.cls data.table}")
https://cli.r-lib.org/reference/cli_abort.html