vlapply {BBmisc}R Documentation

Apply a function with a predefined return value

Description

These are just wrappers around vapply with argument FUN.VALUE set. The function is expected to return a single logical, integer, numeric or character value, depending on the second letter of the function name.

Usage

vlapply(x, fun, ..., use.names = TRUE)

viapply(x, fun, ..., use.names = TRUE)

vnapply(x, fun, ..., use.names = TRUE)

vcapply(x, fun, ..., use.names = TRUE)

Arguments

x

[vector or list]
Object to apply function on.

fun

[function]
Function to apply on each element of x.

...

[ANY]
Additional arguments for fun.

use.names

[logical(1)]
Should result be named? Default is TRUE.


[Package BBmisc version 1.7 Index]