Answers for "apply function to all vector elements r"

0

apply function to all vector elements r

# lapply returns a list of the same length as X, each element of which 
# is the result of applying FUN to the corresponding element of X.

lapply(X, FUN, ...)

sapply(X, FUN, ..., simplify = TRUE, USE.NAMES = TRUE)

vapply(X, FUN, FUN.VALUE, ..., USE.NAMES = TRUE)

replicate(n, expr, simplify = "array")

simplify2array(x, higher = TRUE)
Posted by: Guest on May-23-2021

Code answers related to "apply function to all vector elements r"

Browse Popular Code Answers by Language