NanotimeToNanotime {RcppInt64} | R Documentation |
nanotime to nanotime round-trip demo
Description
This function takes an nanotime-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
NanotimeToNanotime(vec)
Arguments
vec |
A |
Value
A modified nanotime
vector where each element
increased by one
Examples
# generate all powers of 10 fro 0 .. 18
if (requireNamespace("nanotime", quietly=TRUE)) {
v <- nanotime::as.nanotime(10^seq(0,18))
# pass them to function which will add one to each, print and return
NanotimeToNanotime(v)
}
[Package RcppInt64 version 0.0.5 Index]