Learn R Programming

simdata (version 0.4.1)

colapply_functions: Apply list of functions to column of object

Description

Helper function to simplify workflow with lists of functions.

Usage

colapply_functions(obj, flist)

Value

Matrix or data.frame (same type as obj) with names taken from obj.

Arguments

obj

2-dimensional array (matrix or data.frame).

flist

List of functions of length equal to the number of columns of obj. Each entry must be a function applicable to a single column of obj. The i-th entry of flist is applied to the i-th column of obj.