A very quick question that has more to do with my ability to understand the R help files:
x <- c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
h1 <- hist(x, breaks = seq(0,20,by=1), include.lowest = FALSE)
Error in hist.default(x, breaks = seq(0, 20, by = 1), include.lowest = FALSE
some 'x' not counted; maybe 'breaks' do not span range of 'x'
h2 <- hist(x, breaks = seq(0,20,by=1), include.lowest = TRUE)
The first histogram produces an error, the second one doesn't.
From the help files: breaks
: "a vector giving the breakpoints between histogram cells"
include.lowest
: logical; if TRUE, an x[i] equal to the breaks value will be included in the first (or last, for right = FALSE) bar. This will be ignored (with a warning) unless breaks is a vector.
Am I correct in understanding that include.lowest refers to include.lowest.break and NOT include.lowest.datapoint? Just checking. Thanks.