tests/testthat/_snaps/standalone-vctrs.md

vec_ptype2() implements base coercions

Code
  vec_ptype2(lgl(), chr())
Condition
  Error:
  ! Can't combine types <logical> and <character>.
Code
  vec_ptype2(factor("a"), lgl())
Condition
  Error:
  ! Unimplemented class <factor>.

vec_ptype_common() works

Code
  vec_ptype_common(list(lgl(), dbl(), ""))
Condition
  Error:
  ! Can't combine types <double> and <character>.

lossy casts throw

Code
  vec_cast(1.5, 2L)
Condition
  Error:
  ! Can't convert <double> to <integer>.


Try the rlang package in your browser

Any scripts or data that you put into this service are public.

rlang documentation built on Nov. 4, 2023, 9:06 a.m.