Rle factors, table and empty levels
1
0
Entering edit mode
@peter-haverty-5028
Last seen 10.1 years ago
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
IRanges IRanges • 602 views
ADD COMMENT
0
Entering edit mode
@valerie-obenchain-4275
Last seen 2.7 years ago
United States
Thanks Pete. I'll look into it. Valerie On 10/29/12 14:28, Peter Haverty wrote: > 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 > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

Traffic: 619 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6