Learn R Programming

clock (version 0.7.1)

vec_arith.clock_year_day: Support for vctrs arithmetic

Description

Support for vctrs arithmetic

Usage

# S3 method for clock_year_day
vec_arith(op, x, y, ...)

# S3 method for clock_year_month_day vec_arith(op, x, y, ...)

# S3 method for clock_year_month_weekday vec_arith(op, x, y, ...)

# S3 method for clock_iso_year_week_day vec_arith(op, x, y, ...)

# S3 method for clock_naive_time vec_arith(op, x, y, ...)

# S3 method for clock_year_quarter_day vec_arith(op, x, y, ...)

# S3 method for clock_sys_time vec_arith(op, x, y, ...)

# S3 method for clock_year_week_day vec_arith(op, x, y, ...)

# S3 method for clock_weekday vec_arith(op, x, y, ...)

Value

The result of the arithmetic operation.

Arguments

op

An arithmetic operator as a string

x, y

A pair of vectors. For !, unary + and unary -, y will be a sentinel object of class MISSING, as created by MISSING().

...

These dots are for future extensions and must be empty.

Examples

Run this code
vctrs::vec_arith("+", year_month_day(2019), 1)

Run the code above in your browser using DataLab