Learn R Programming

metagene (version 1.0.0)

applyOnGroups: Apply a function on every groups of the main data structure

Description

This function takes a list of elements and apply a user-specified function on them. Works like lapply, but can use multiple cores if asked.

Usage

applyOnGroups( groups, cores=1, FUN, ...)

Arguments

groups
The main data structure
cores
Number of cores for parallel processing. Require parallel package.
FUN
The function to apply on every groups.
...
Extract arguments for FUN.

Value

The applyOnGroups return value will vary depending on the function specified by the user.

Examples

Run this code
  ## Not run: a <- list("a", "b", "c")
  ## Not run: metagene:::applyOnGroups(a, cores=1, FUN=print)

Run the code above in your browser using DataLab