evalCpp {Rcpp}R Documentation

Evaluate a C++ Expression

Description

Evaluates a C++ expression. This creates a C++ function using cppFunction and calls it to get the result.

Usage

evalCpp(code, depends = character(), plugins = character(),
        includes = character(), rebuild = FALSE, showOutput = verbose, 
        verbose = getOption("verbose"))
areMacrosDefined(names, depends = character(), includes = character(), 
        rebuild = FALSE, showOutput = verbose, 
        verbose = getOption("verbose"))

Arguments

code

C++ expression to evaluate

names

names of the macros we want to test

plugins

see cppFunction

depends

see cppFunction

includes

see cppFunction

rebuild

see cppFunction

showOutput

see cppFunction

verbose

see cppFunction

Value

The result of the evaluated C++ expression.

Note

The result type of the C++ expression must be compatible with Rcpp::wrap.

See Also

sourceCpp, cppFunction

Examples

## Not run: 

evalCpp( "__cplusplus" )
evalCpp( "std::numeric_limits<double>::max()" )
    
areMacrosDefined( c("__cplusplus", "HAS_TR1" ) )


## End(Not run)

[Package Rcpp version 0.12.3 Index]