subsetLoops {diffloop} | R Documentation |
subsetLoops
restricts the loops and counts matrix to only those
specified by idxa
, either numerically or logically
subsetLoops(dlo, idxa) ## S4 method for signature 'loops,logical' subsetLoops(dlo, idxa) ## S4 method for signature 'loops,numeric' subsetLoops(dlo, idxa)
dlo |
A loops object |
idxa |
A numeric vector or logical vector |
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.
A loops object
# 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)