groupStatI: Perform Summary Analysis by Group Using an Index

View source: R/misc.R

groupStatIR Documentation

Perform Summary Analysis by Group Using an Index

Description

This function applies a specified function to each group defined by an index, and returns a summary of the results. It is useful for summarizing data by group when the groups are defined by an index rather than a named column.

Usage

groupStatI(f, x, idx)

Arguments

f

A function that takes a single argument and returns a summary of the data.

x

A data frame or matrix containing the data to be summarized.

idx

A vector of indices or group names that define the groups.

Value

A data frame or matrix containing the summary statistics for each group.


easybio documentation built on Sept. 17, 2024, 1:08 a.m.