    library(GenomicRanges)

    gr=GRanges(seqnames=c("chr1","chr2","chr2"),
               ranges=IRanges(start=c(50,150,200),end=c(100,200,300)),
               strand=c("+","-","-")
    )

I want to get all intervals between 200-300 on chromosome 2, the minus strand. How do I do that?

    gr[seqnames(gr) == "chr2" & start(gr) > 200 & end(gr) < 300 & strand(gr) == "-"]

does not work as it does not find the overlaps with 200-300, but rather the intervals strictly contained in that range.
Make a query range, then `subsetByOverlaps` (sorry in comments by mistake mentioned `findOverlaps`):

    q=GRanges(seqnames="chr2",
              ranges=IRanges(start = 200, end = 300),
              strand="-")
    
    subsetByOverlaps(gr, q)

