vctrs
vctrs copied to clipboard
Export `stop_unsupported()`
For extension packages that implement some of vec_math()
, but not all of it
Although this seems to work fairly well too (at least for rcrd types which error by default on all math functions)
#' @export
vec_math.clock_calendar <- function(.fn, .x, ...) {
switch(
.fn,
is.nan = calendar_is_nan(.x),
is.finite = calendar_is_finite(.x),
is.infinite = calendar_is_infinite(.x),
NextMethod()
)
}