``` L50width <- function(gb) weighted.mean(width(gb), as.numeric(width(gb))) # as.num to avoid integer overflow summaryWidth <- function(gb) { s <- summary(width(gb)) s["L50"] <- L50width(gb) s } ```