Skip to contents

These functions are short wrappers around typical vapply calls for easier development.

Usage

vapply1c(X, FUN, ..., USE.NAMES = FALSE)

vapply1d(X, FUN, ..., USE.NAMES = FALSE)

vapply1l(X, FUN, ..., USE.NAMES = FALSE)

Arguments

X

a vector (atomic or list).

FUN

the function to be applied to each element of X.

...

optional arguments to FUN.

USE.NAMES

logical, should the return value be named.

Value

vapply1c returns a vector of characters of length X.

vapply1d returns a vector of doubles of length X.

vapply1l returns a vector of logicals of length X.

See also

Other helper functions for developers: between(), isPeaksMatrix(), rbindFill(), validPeaksMatrix(), which.first()

Author

Sebastian Gibb

Examples

l <- list(a=1:3, b=4:6)
vapply1d(l, sum)
#> [1]  6 15