subsetLoops {diffloop} | R Documentation

## Subset loops

### Description

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

### Usage

    subsetLoops(dlo, idxa)

    ## S4 method for signature 'loops,logical'
    subsetLoops(dlo, idxa)

    ## S4 method for signature 'loops,numeric'
    subsetLoops(dlo, idxa)

### Arguments

`dlo` | A loops object
`idxa` | A numeric vector or logical vector

### 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.

### Value

A loops object

### Examples

    # 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)

[Package diffloop version 1.8.0 Index]