
Last chance! 50% off unlimited learning
Sale ends in
TrimHistogram(x, left=TRUE, right=TRUE)
hist
).TRUE
, consecutive buckets in the left tail of the
histogram without any elements will
be removed from the returned histogram.TRUE
, consecutive buckets in the right tail of the
histogram without any elements will
be removed from the returned histogram.histogramtools-package
and
hist
.
hist.1 <- hist(c(1,2,3), breaks=c(0,1,2,3,4,5,6,7,8,9), plot=FALSE)
length(hist.1$counts)
sum(hist.1$counts)
hist.trimmed <- TrimHistogram(hist.1)
length(hist.trimmed$counts)
sum(hist.trimmed$counts)
Run the code above in your browser using DataLab