Skip to contents

applyOverDFList operates on a list of data frames where all data frames has the same size and columns. Column of interest is extracted from each data frame and column binded in groups, next fun is applied over rows. Final result is a matrix with result for each group on a separate column. Function is parallelized over groups.

Usage

applyOverDFList(list_of_df, col_name, fun, groups)

Arguments

list_of_df

list of data.frames.

col_name

string specifying column in data.frames to apply fun on.

fun

function to apply, should take a single vector as a argument.

groups

factor defining how elements of list_of_df should be grouped.

Value

matrix with nrow(list_of_df[[1]]) rows and nlevels(groups) columns.