Octave Identity Function

Description

This function calls the Octave function provided by the module shipped with RcppOctave. It Returns its arguments unchanged, and is mainly used to test and check the effect of object conversions between R and Octave.

Usage

o_identity(...)

Arguments

...
any R object supported by RcppOctave.

Value

its argument -- list -- after its conversion from R to Octave and from Octave to R.

Examples


## Don't show: 
# roxygen generated flag
options(R_CHECK_RUNNING_EXAMPLES_=TRUE)
## End Don't show

o_identity(1L)
## [1] 1
o_identity(1:10)
##  [1]  1  2  3  4  5  6  7  8  9 10
o_identity(matrix(1:10, 2,5))
##      [,1] [,2] [,3] [,4] [,5]
## [1,]    1    3    5    7    9
## [2,]    2    4    6    8   10

o_identity(1)
## [1] 1
o_identity(runif(10))
##  [1] 0.1993 0.9445 0.2120 0.4935 0.6421 0.3449 0.4680 0.9639 0.8025 0.1576
o_identity(matrix(runif(10), 2,5))
##         [,1]    [,2]   [,3]   [,4]   [,5]
## [1,] 0.68274 0.08327 0.2278 0.9669 0.5568
## [2,] 0.04178 0.03937 0.1516 0.7987 0.3718