powered by
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.
myApplyVector(FUN = NULL, dataVector = NULL, out.ncols = 1, ...)
the function to apply
The vector to which elements apply the function
Number of columns for the output matrix
Further arguments to passed
# NOT RUN { exampleF <- function(X){c(X + 5, X*5)} myApplyVector(FUN = exampleF, dataVector = 1:10, out.ncols = 2) # }
Run the code above in your browser using DataLab