Functions that apply expressions to the rows of input objects and return atomic vectors e.g., numeric (double), integer, character, logical.

vapr_chr: Iterate over input rows and return character(s)

vapr_dbl: Iterate over input rows and return numeric(s)

vapr_lgl: Iterate over input rows and return logical(s)

vapr_int: Iterate over input rows and return integer(s)

vapr_chr(.data, .f, ...)

vapr_dbl(.data, .f, ...)

vapr_lgl(.data, .f, ...)

vapr_int(.data, .f, ...)

Arguments

.data

Input object–must be two-dimensional (e.g., matrix, data.frame) –over which the first dimension (rows) will be iterated

.f

Action to apply to each element of .data. The action can be articulated in one of the four following ways:

  1. supplying a function object (e.g., mean)

  2. defining a function (in-line; e.g., function(x) mean(x))

  3. specifying a formula-like call where '.x' is assumed to be the iterated over element of .data (e.g., ~ mean(.x))

  4. providing a name or position of .data to return (e.g., 1, "varname", etc.)

...

Other values passed to function call.

Value

A character vector

A numeric vector

A logical vector

An integer vector

See also

lap dap

Other vap: vapc, vap