tests/testthat/_snaps/trans.md

as.transform generates informative error

Code
  as.transform(1)
Condition
  Error in `as.transform()`:
  ! `1` must be a character vector or a transformer object
Code
  as.transform("x")
Condition
  Error in `as.transform()`:
  ! Could not find any function named `transform_x()` or `x_trans()`

trans has useful print method

Code
  new_transform("test", transform = identity, inverse = identity)
Output
  Transformer: test [-Inf, Inf]


hadley/scales documentation built on Jan. 10, 2024, 2:06 p.m.