extend_breaks_min_and_max | R Documentation |
The 'cut' function can sometimes fail to include the minimum and maximum values into intervals due to 'the floating point trap'. This function modifies the breaks by extending the lower and uppermost values so it always includes the minimum and maximum.
extend_breaks_min_and_max(x, breaks, extension = 1e-04)
x |
Numeric vector with all values that intervals should include. |
breaks |
Numeric vector with the breaks that might need to be extended. |
extension |
A real number by which the maximum and minimum values should be extended if the originals don't include all values in 'x'. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.