Learn R Programming

expandFunctions (version 0.1.0)

eMatrixOuter: Extends eOuter to allow a matrix for the first argument

Description

Extends eOuter to allow a matrix for the first argument

Usage

eMatrixOuter(X, colParamVector, FUN, ...)

Arguments

X
R object coercible to a matrix the columns of this will be the argument of FUN (see below).
colParamVector
Vector input which will be the second argument of FUN (see below).
FUN
Function which will be applied to FUN(X[,i],colParamVector[j],...)
...
Additional arguments to FUN.

Value

Returns a matrix with the matrics generated by eOuter for each column column bound together. This means that each row of the returned matrix represents single observations (at least as long as no lags are used).

Details

This function is a simple extension of eOuter which allows the function eOuter(X[,i],colParamVector,FUN,...) for i in the columns of X.

Examples

Run this code
A <- matrix(1:6,ncol=2)
temp <- eMatrixOuter(A,0:2,FUN=`^`)

Run the code above in your browser using DataLab