myApplyVector {KarsTS} | R Documentation |
myApplyVector: apply type function
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
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
exampleF <- function(X){c(X + 5, X*5)}
myApplyVector(FUN = exampleF, dataVector = 1:10, out.ncols = 2)
[Package KarsTS version 2.4.1 Index]