lvapply: Apply a Function over a List of Atomic Vectors

View source: R/helpers.R

lvapplyR Documentation

Apply a Function over a List of Atomic Vectors

Description

Provides a fast, vectorized alternative to lapply for a list of atomic vectors operated on by a function whose result is the same length as its input.

Usage

lvapply(X, FUN, ...)

Arguments

X

List of atomic vectors.

FUN

Function to be applied to each element of X.

...

Arguments passed to FUN.

Value

Object of the same length as X.

See Also

Other helper functions: capitalize_words, ch1903_to_wgs84, clean_strings, format_addresses, format_scientific_names, is.empty, melt_by_listcol, na.remove, normalize_language, parse_scientific_names, quotemeta, replace_values_in_list, sp_transform, subset_search_results, unique_na

Examples

x <- list(c("a", "b"), c(), c("d"))
lvapply(x, gsub, pattern = "d", replacement = "e")

falling-fruit/fruitr documentation built on Dec. 21, 2024, 8:32 p.m.