Learn R Programming

diffloop (version 1.0.2)

subsetLoops: Subset loops

Description

subsetLoops restricts the loops and counts matrix to only those specified by idxa, either numerically or logically

Usage

subsetLoops(dlo, idxa)

## S3 method for class 'loops,logical': subsetLoops(dlo, idxa)

## S3 method for class 'loops,numeric': subsetLoops(dlo, idxa)

Arguments

dlo
A loops object
idxa
A numeric vector or logical vector

Value

  • A loops object

Details

This function returns a loops object where the loops are retained only if they meet a logical criteria or are included in the numeric vector of idxa. Only the anchors that reference a loop in the subsetted loops object are retained.

Examples

Run this code
# Return the first 10 loops
rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/')
load(rda)
#' ten <- subsetLoops(loops.small, 1:10)

# Subset loops with widths greater than 10000
big <- subsetLoops(loops.small, loopWidth(loops.small) >= 10000)

Run the code above in your browser using DataLab