myApplyVector: myApplyVector: apply type function

Description Usage Arguments Author(s) Examples

View source: R/myApplyVector.R

Description

This function applies a function to the elements of a vector so that the result for each element is located in a row in a matrix. It is used internally.

Usage

1
myApplyVector(FUN = NULL, dataVector = NULL, out.ncols = 1, ...)

Arguments

FUN

the function to apply

dataVector

The vector to which elements apply the function

out.ncols

Number of columns for the output matrix

...

Further arguments to passed

Author(s)

Marina Saez Andreu

Examples

1
2
exampleF <- function(X){c(X + 5, X*5)}
myApplyVector(FUN = exampleF, dataVector = 1:10, out.ncols = 2)

KarsTS documentation built on Jan. 16, 2021, 5:07 p.m.