summariseCols: Perform summary of vectors in the parent frame

View source: R/summariseCols.R

summariseColsR Documentation

Perform summary of vectors in the parent frame

Description

Parses a matrix of object/summary instructions, and applies the specified function to the object. The object(s) named in colfun must exist in a parent frame.

Usage

summariseCols(colfun, nfr = 3L)

Arguments

colfun

a character matrix with two columns. The first should be a function name, the second a column in data.

nfr

single positive integer number of frames up to look for named variables (default 3)

Value

data frame with column names constructed from colfun

Examples

A <- split(1:10, rep(1, each = 10))
dataCols <- matrix(c("A", "mean",
        "A", "median",
        "A", "var"), ncol = 2, byrow = TRUE)
GENEAclassify:::summariseCols(colfun = dataCols)
A <- split(1:10, rep(1:2, each = 5))
GENEAclassify:::summariseCols(colfun = dataCols)

GENEAclassify documentation built on June 22, 2024, 11:47 a.m.