tests/testthat/_snaps/span.md

missing + missing = error errors

Code
  iv_span(x, missing = "error")
Condition
  Error in `iv_span()`:
  ! `x` can't contain missing values.

missing + missing = drop + empty = error errors

Code
  iv_span(x, missing = "drop", empty = "error")
Condition
  Error in `iv_span()`:
  ! `x` can't be empty.

empty + empty = error errors

Code
  iv_span(x, empty = "error")
Condition
  Error in `iv_span()`:
  ! `x` can't be empty.

span casts pre-proxied empty to pre-proxied type of x

Code
  iv_span(x, empty = empty)
Condition
  Error in `iv_span()`:
  ! Can't convert `empty` <iv<double>> to match type of `x` <nested_integer_iv>.
Code
  iv_span(x, empty = empty)
Condition
  Error in `iv_span()`:
  ! Can't convert `empty` <nested_integer_iv> to match type of `x` <iv<integer>>.

span casts pre-proxied missing to pre-proxied type of x

Code
  iv_span(x, missing = missing)
Condition
  Error in `iv_span()`:
  ! Can't convert `missing` <iv<integer>> to match type of `x` <nested_integer_iv>.
Code
  iv_span(x, missing = missing)
Condition
  Error in `iv_span()`:
  ! Can't convert `missing` <nested_integer_iv> to match type of `x` <iv<integer>>.

errors on non-empty dots

Code
  iv_span(x, 2)
Condition
  Error in `iv_span()`:
  ! `...` must be empty.
  x Problematic argument:
  * ..1 = 2
  i Did you forget to name an argument?

validates x is an iv

Code
  iv_span(1)
Condition
  Error in `iv_span()`:
  ! `x` must be an <iv>, not the number 1.

validates empty

Code
  iv_span(x, empty = "x")
Condition
  Error in `iv_span()`:
  ! `empty` must be one of "missing" or "error", not "x".
Code
  iv_span(x, empty = 1)
Condition
  Error in `iv_span()`:
  ! `empty` must be a string or an iv, not the number 1.
Code
  iv_span(x, empty = iv(1.5, 2.5))
Condition
  Error in `iv_span()`:
  ! Can't convert from `empty` <double> to `x` <integer> due to loss of precision.
  * Locations: 1
Code
  iv_span(x, empty = iv(1:2, 2:3))
Condition
  Error in `iv_span()`:
  ! `empty` must have size 1, not size 2.

validates missing

Code
  iv_span(x, missing = "x")
Condition
  Error in `iv_span()`:
  ! `missing` must be one of "propagate", "drop", or "error", not "x".
Code
  iv_span(x, missing = 1)
Condition
  Error in `iv_span()`:
  ! `missing` must be a string or an iv, not the number 1.
Code
  iv_span(x, missing = iv(1.5, 2.5))
Condition
  Error in `iv_span()`:
  ! Can't convert from `missing` <double> to `x` <integer> due to loss of precision.
  * Locations: 1
Code
  iv_span(x, missing = iv(1:2, 2:3))
Condition
  Error in `iv_span()`:
  ! `missing` must have size 1, not size 2.


Try the ivs package in your browser

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

ivs documentation built on March 31, 2023, 7:47 p.m.