Learn R Programming

metagene (version 1.0.0)

scaleVectors: Resize the vectors of every group so they have the same length.

Description

This function takes a list of list of vectors and scale them so they have the same size

Usage

scaleVectors( group, level, domain, scaleCores=1)

Arguments

group
A list that contains a list of list of vectors
level
The names of the element of the group to scale
domain
The target length for the vectors
scaleCores
Number of cores for parallel processing (require parallel package)

Value

scaleVectors returns the same group that was used in input with an extra element named scaled.

Details

A group can contain multiple list of list of vectors (i.e.: if debug == TRUE). We need to to specify which one to use with the level argument.

Each second level list can contain multiple list corresponding to each bam files associated with current group. Each vector of each bam files sublist will be scaled to the size specified with the domain argument.

Examples

Run this code
  ## Not run: group <- list(l1=list(element1=list(1:10, 1:100)))
  ## Not run: metagene:::scaleVectors(group, "l1", 100)

Run the code above in your browser using DataLab