Int64toInt64 {RcppInt64}R Documentation

Integer64 to Integer64 round-trip demo

Description

This function takes an integer64-valued input vector, converts it to the equivalent int64_t vector in C++, displays each element after first adding one, and returns the modified vector.

Usage

Int64toInt64(vec)

Arguments

vec

An integer64-classed vector from R

Value

A modified integer64 vector where each element increased by one

Examples

# generate all powers of 10 fro 0 .. 18
if (requireNamespace("bit64", quietly=TRUE)) {
    v <- bit64::as.integer64(10^seq(0,18))
    # pass them to function which will add one to each, print  and return
    Int64toInt64(v)
}

[Package RcppInt64 version 0.0.5 Index]