Learn R Programming

downscaledl (version 1.0)

RcppArmadillo-Functions: Set operation of functions in RcppArmadillo package

Description

These four functions are created when RcppArmadillo.package.skeleton() is invoked to create a skeleton packages.

Usage

rcpparmabasic_test()
rcpparmabasic_outerproduct(x)
rcpparmabasic_innerproduct(x)
rcpparmabasic_bothproducts(x)

Arguments

x

a numeric vector

Value

rcpparmabasic_test() does not return a value, but displays a message to the console.

rcpparmabasic_outerproduct() returns a numeric matrix computed as the outer (vector) product of x.

rcpparmabasic_innerproduct() returns a double computer as the inner (vector) product of x.

rcpparmabasic_bothproducts() returns a list with both the outer and inner products.

Details

These are example functions which should be largely self-explanatory.

References

See the documentation for Armadillo, and RcppArmadillo, for more details.

Examples

Run this code
# NOT RUN {
  x <- sqrt(1:4)
  rcpparmabasic_innerproduct(x)
  rcpparmabasic_outerproduct(x)
# }

Run the code above in your browser using DataLab