Nothing
myApplyVector <-
function(FUN = NULL, dataVector = NULL, out.ncols = 1, ...) {
if (is.null(FUN)) {
stop("First argument (FUN) missing")
} else if (is.null(dataVector)) {
stop("Second argument (dataVector) missing")
} else if (is.vector(dataVector)) {
FUN <- match.fun(FUN)
lVector <- length(dataVector)
res <- matrix(NA, lVector, out.ncols)
for (i in 1:lVector) {
res[i, ] <- forceAndCall(2, FUN, dataVector[i], ...)
}
if (out.ncols == 1) {
res <- as.vector(res)
}
res
} else {
stop("The input must be a vector")
}
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.