Examples of uses of List

Description

List is an Rcpp class that can be used to manipulate R lists.

Arguments

params

A heterogeneous list specifying method (string), tolerance (double), maxIter (int) and startDate (Date in R, RcppDate in C++).

Value

RcppListExample returns a list containing:

method

string input paramter

tolerance

double input paramter

maxIter

int input parameter

startDate

Date type with starting date

params

input parameter list (this is redundant because we returned the input parameters above)

Author(s)

Dominick Samperi wrote the initial versions of Rcpp (and RcppTemplate) during 2005 and 2006. Dirk Eddelbuettel made some additions, and became maintainer in 2008. Dirk Eddelbuettel and Romain Francois have been extending Rcpp since 2009.

References

Writing R Extensions, available at https://www.r-project.org.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# set up some value
params <- list(method='BFGS',
               tolerance=1.0e-5,
               maxIter=100,
               startDate=as.Date('2006-7-15'))

# call the underlying  C++ function
result <- RcppListExample(params)

# inspect returned object
result