clock-arith: Support for vctrs arithmetic

Description Usage Arguments Value Examples

Description

Support for vctrs arithmetic

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## S3 method for class 'clock_year_day'
vec_arith(op, x, y, ...)

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

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

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

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

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

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

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

Arguments

op

An arithmetic operator as a string

x

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

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.

Value

The result of the arithmetic operation.

Examples

1
vctrs::vec_arith("+", year_month_day(2019), 1)

clock documentation built on Sept. 21, 2021, 5:10 p.m.