BUG: median(IRanges::Rle(NA),na.rm=TRUE)) should return NA
0
0
Entering edit mode
Malcolm Cook ★ 1.6k
@malcolm-cook-6293
Last seen 3 months ago
United States
Hi, I think the Rle functions should preserve semantics from stats. Here is at least one case where they do not: > median(Rle(NA),na.rm=TRUE) Error in x[FALSE] : subscript out of bounds # but: > median(c(NA),na.rm=TRUE) [1] NA # some other border cases: > median(c()) NULL # arguably correct, if you read the docs and appreciate that as(NA,class(c())) is NULL > median(Rle()) Error in x[FALSE] : subscript out of bounds # should probably be NULL Agreed? Can be fixed? Thanks! ~ Malcolm Cook Computational Biology / Shilatifard Lab - Stowers Institute for Medical Research - Kansas City
• 685 views
ADD COMMENT

Login before adding your answer.

Traffic: 503 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