Description Usage Arguments Value Author(s) See Also Examples
Function for rounding and/or segmenting a range.
1 |
x |
A numeric vector. |
dec |
Number of decimal points for rounding using function
|
step |
Round the |
n.seg |
Numeric value, number of values in the equally spaced sequence. Default is 2 (min, max). |
vector, range of equally spaced sequence.
Jacolien van Rij
Other Utility functions:
findAbsMin()
,
find_n_neighbors()
,
firstLetterCap()
,
getArrowPos()
,
getDec()
,
getRatioCoords()
,
get_palette()
,
group_sort()
,
inch2coords()
,
isColor()
,
list2str()
,
move_n_point()
,
orderBoxplot()
,
se()
,
sortGroups()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | zlim <- c(-2.5, 3.01)
# does not change anything:
getRange(zlim)
# create a range of 5 numbers:
# (basically just using seq )
getRange(zlim, n.seg=5)
# rounds the numbers:
getRange(zlim, dec=0)
getRange(zlim, n.seg=5, dec=0)
# extreme values are multiplications of 5
# that contains zlim values:
getRange(zlim, step=5)
getRange(zlim, step=5, n.seg=5)
# similar, but not the same:
getRange(zlim, n.seg=5, dec=0)
getRange(zlim, n.seg=5, step=1)
# combining:
getRange(zlim, n.seg=5, step=1, dec=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.