> levels(cut(0, breaks=c(-1, round(-0.1), 1)))
 "(-1,-0]" "(-0,1]"
Is the "-0" in the labels intended? It is surprising, given that
printing 'round(-0.1)' gives "0" rather than "-0".
The "-0" occurs because the numeric values in the labels are obtained
by formatC(). If this behaviour is deemed to be a bug, one possible
fix is, in cut.default(), in the line
ch.br <- formatC(breaks, digits = dig, width = 1L)
replace 'breaks' by 'breaks + 0'.
[The use case that exhibited this behaviour was an attempt to generate
groups of approximately equal size with round numbers for the breaks,
z <- diff(faithful$eruptions)
qz <- quantile(z)
table(cut(z, c(floor(qz), round(qz[2:4]), ceiling(qz))))
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
 LC_COLLATE=English_United States.1252
 LC_CTYPE=English_United States.1252
 LC_MONETARY=English_United States.1252
 LC_TIME=English_United States.1252
attached base packages:
 stats graphics grDevices utils datasets methods base
R-devel [R Under development (unstable) (2014-05-20 r65701)]
gives the same result.
Most implementations of C follow IEC60559 and have signed zeros. Although R does not make use of them, it is still a C program and here you are seeing the results of (C-level) sprintf("%.0f", -0).
Given the description
Formatting numbers individually and flexibly, using ‘C’ style
it is intended for formatC, at least.
This is not an I/O bug, so the Component is wrong.