filterParams: filterParams

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

Given a list, select just only the valid.elements from each member. Also works with vectors instead of lists

Usage

1
filterParams(p, valid.elements, orig.length)

Arguments

p

a list or a single vector

valid.elements

a boolean vector with the elements to keep

orig.length

the length of the elements on which to apply the filtering

Details

This function is used in filtering the graphical parameters when plotting only a part of the genome. For each element of the list, if it has the exact specified length, filters it using the 'valid.elements' parameter.

Value

p with some members filtered

Examples

1
2
3
4
5
6
7
8
 
a <- 1:10
b <- 3:5
c <- 2

filterParams(list(a,b,c), c(rep(TRUE,5), rep(FALSE,5)), 10)
filterParams(a, c(rep(TRUE,5), rep(FALSE,5)), 10)
 

karyoploteR documentation built on Nov. 8, 2020, 5:52 p.m.