R/GElist-methods.R

                                        # subset
setMethod('[[', 'GElist', function(x, i, j = "missing"){
    GEl = x@Objlist[[i]]
    GEl
})

setMethod('[[<-', 'GElist', function(x, i, j = "missing", value) {
    x@Objlist[[i]] = value
    x
})

setMethod('[', 'GElist', function(x, inds, i='missing', j='missing',
                                  drop ="missing") {
    x@Objlist = x@Objlist[inds]
    x
})

                                        # length
setMethod('length', 'GElist', function(x) {
    length(x@Objlist)
})

setMethod("$", "GElist", function(x, name){
    x@Objlist[[name]]
})

Try the methylPipe package in your browser

Any scripts or data that you put into this service are public.

methylPipe documentation built on Nov. 8, 2020, 6:51 p.m.