levapply: levapply

levapplyR Documentation

levapply

Description

Applies FUN locally to levels of x and returns vector of length() (eg can do a "local" order within levels)

Usage

levapply(x, by, FUN = "order")

Arguments

x

input vector of data

by

length(x) vector of categorical labels

FUN

function that takes a length k vector and outputs a length k vector, used for processing each "level" of by

Value

length(x) vector of outputs, the results of applying FUN to each "by" defined level of x

Author(s)

Marcin Imielinski


mskilab/skitools documentation built on Aug. 31, 2023, 1:13 p.m.