[Bioc-devel] 'droplevels' argument in `[` method for SummarizedExperiment?

Ryan C. Thompson rct at thompsonclan.org
Wed Mar 12 23:24:01 CET 2014

I would prefer the droplevels method for SummarizedExperiment, since 
this is consistent with the use of droplevels on data.frame objects.

On Wed 12 Mar 2014 03:02:37 PM PDT, Wolfgang Huber wrote:
> Hi Martin, Mike
> a DESeq2 user brought up the observation that when he subsets a ‘DESeqDataSet’ object (the class inherits from ‘SummarizedExperiment’) by samples, he often ends up with unused factor levels in the colData. (Esp. since the subsetting is often to select certain subgroups). Would either of the following two make sense:
> - a ‘droplevels’ method for ‘SummarizedExperiment’ that efficiently and conveniently removes unused levels, i.e.
>       x = x[, x$tissue %in% c(“guts”, “brains”)]
>       x = droplevels(x)
> - a ‘droplevels’ argument (default: FALSE)
>       x = x[, x$tissue %in% c(“guts”, “brains”), droplevels=TRUE]
> Wolfgang
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

More information about the Bioc-devel mailing list