Learn R Programming

partition (version 0.2.2)

return_if_single: Reduce targets if more than one variable, return otherwise

Description

Reduce targets if more than one variable, return otherwise

Usage

return_if_single(.x, .f, ...)

Value

a numeric vector, the reduced or original variable

Arguments

.x

a data.frame containing the targets to reduce

.f

a reduction function to apply

...

arguments passed to .f