plotbiomes icon indicating copy to clipboard operation
plotbiomes copied to clipboard

use deparse-substitute in the validation helper functions

Open valentinitnelav opened this issue 7 years ago • 1 comments

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'" )

valentinitnelav avatar Oct 22 '18 10:10 valentinitnelav

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

Aariq avatar Oct 15 '25 22:10 Aariq