[BioC] Rle factors, table and empty levels

Peter Haverty haverty.peter at gene.com
Mon Oct 29 22:28:27 CET 2012


Dear Group,

table(Rle) seems to ignore empty levels.

x = Rle(c(2,3,1,2,3,2),rep(2,6))
levels(x) = as.character(0:5)
table(x)
table(factor(as.numeric(x),levels=as.character(0:5)))

I am using R 2.15.1 and IRanges 1.17.1.

Regards,
Pete

____________________
Peter M. Haverty, Ph.D.
Genentech, Inc.
phaverty at gene.com



More information about the Bioconductor mailing list