groupStatI {easybio} | R Documentation |
Perform Summary Analysis by Group Using an column Index
Description
This function applies a specified function to each group defined by an column index, and returns a summary of the results. It is useful for summarizing data by group when the groups are defined by an column index.
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 list of indices or group names that define the column groups. |
Value
A list containing the summary statistics for each group.
Examples
library(easybio)
groupStatI(f = \(x) x + 1, x = mtcars, idx = list(c(1, 10), 2))
[Package easybio version 1.1.1 Index]