almanac-vctrs-compat: vctrs compatibility functions

almanac-vctrs-compatR Documentation

vctrs compatibility functions

Description

These functions are the extensions that allow stepper objects to work with vctrs.

Usage

## S3 method for class 'almanac_stepper'
vec_arith(op, x, y, ...)

## S3 method for class 'almanac_stepper.almanac_stepper'
vec_ptype2(x, y, ..., x_arg = "", y_arg = "")

## S3 method for class 'almanac_stepper.almanac_stepper'
vec_cast(x, to, ..., x_arg = "", to_arg = "")

Arguments

op

An arithmetic operator as a string.

x, y, to

Objects.

...

Used to pass along error message information.

x_arg, y_arg, to_arg

Used to pass along error message information.

Value

See the corresponding vctrs function for the exact return value.

Examples

library(vctrs)
vec_arith("+", as.Date("2019-01-04"), workdays(1))

almanac documentation built on April 14, 2023, 12:23 a.m.