Learn R Programming

disordR (version 0.9-8.2)

Arith: Arithmetic operations

Description

Arithmetic operations including low-level helper functions

Usage

disord_inverse(a)
disord_mod_disord(a,b)
disord_mod_numeric(a,b)
disord_negative(a)
disord_plus_disord(a,b)
disord_plus_numeric(a,b)
disord_power_disord(a,b)
disord_power_numeric(a,b)
numeric_power_disord(a,b)
disord_prod_disord(a,b)
disord_prod_numeric(a,b)
disord_arith_unary(e1,e2)
disord_arith_disord(e1,e2)
disord_arith_numeric(e1,e2)
numeric_arith_disord(e1,e2)

Value

Return a disord object or logical

Arguments

a,b

at least one is a disord object

e1,e2

Formal arguments for S4 dispatch

Methods

Arith

signature(e1="disord", e2="disord"): Dispatched to disord_arith_disord()

Arith

signature(e1="disord", e2="numeric"): Dispatched to disord_arith_numeric()

Arith

signature(e1="numeric", e2="disord"): Dispatched to numeric_arith_disord()

Arith

signature(e1="disord", e2="missing"): Dispatched to disord_arith_unary()

Author

Robin K. S. Hankin

Details

Basic low-level arithmetic operations, intended to be called from S4 dispatch.

These functions return a disord object or a regular vector as appropriate. Consistency is required. The hash is set to be that of the disord object if appropriate.

Examples

Run this code

a <- rdis()
a
a + 2*a
a > 5
a[a > 5] <- a[a > 5] + 100
a

Run the code above in your browser using DataLab