Skip to content

Binary operators for integer64 vectors.

Usage

binattr(e1, e2)

# S3 method for class 'integer64'
e1 + e2

# S3 method for class 'integer64'
e1 - e2

# S3 method for class 'integer64'
e1%/%e2

# S3 method for class 'integer64'
e1%%e2

# S3 method for class 'integer64'
e1 * e2

# S3 method for class 'integer64'
e1^e2

# S3 method for class 'integer64'
e1/e2

# S3 method for class 'integer64'
e1 == e2

# S3 method for class 'integer64'
e1 != e2

# S3 method for class 'integer64'
e1 < e2

# S3 method for class 'integer64'
e1 <= e2

# S3 method for class 'integer64'
e1 > e2

# S3 method for class 'integer64'
e1 >= e2

# S3 method for class 'integer64'
e1 & e2

# S3 method for class 'integer64'
e1 | e2

# S3 method for class 'integer64'
xor(x, y)

Arguments

e1

an atomic vector of class 'integer64'

e2

an atomic vector of class 'integer64'

x

an atomic vector of class 'integer64'

y

an atomic vector of class 'integer64'

Value

&, |, xor(), !=, ==, <, <=, >, >= return a logical vector

^ and / return a double vector

+, -, *, %/%, %% return a vector of class 'integer64'

Examples

  as.integer64(1:12) - 1
#> integer64
#>  [1] 0  1  2  3  4  5  6  7  8  9  10 11
  options(integer64_semantics="new")
  d <- 2.5
  i <- as.integer64(5)
  d/i  # new 0.5
#> [1] 0.5
  d*i  # new 13
#> integer64
#> [1] 13
  i*d  # new 13
#> integer64
#> [1] 13
  options(integer64_semantics="old")
  d/i  # old: 0.4
#> [1] 0.4
  d*i  # old: 10
#> integer64
#> [1] 10
  i*d  # old: 13
#> integer64
#> [1] 13