Description Usage Arguments Value Author(s) See Also Examples
This function serves as an alternative to the R function 'extendrange', when user wishes to conserve a point of symmetricity for the range. For example, this might be desired when the plot should be symmetric around the origin x=0, but that the sides need to extend beyond the actual range of values.
1 | extendsymrange(x, r = range(x, na.rm = T), f = 0.05, sym = 0)
|
x |
Vector of values to compute the range for |
r |
The range of values |
f |
The factor by which the range is extended beyond the extremes |
sym |
The defined point of symmetricity |
A vector of 2 values for the lower and higher limit of the symmetric extended range
Teemu Daniel Laajala <teelaa@utu.fi>
1 2 3 4 | set.seed(1)
ex <- rnorm(10)+2
hist(ex, xlim=extendsymrange(ex, sym=0), breaks=100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.