extendsymrange: Extend range of variable limits while retaining a point of symmetricity
Description
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.
Usage
extendsymrange(x, r = range(x, na.rm = T), f = 0.05, sym = 0)
Arguments
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
Value
A vector of 2 values for the lower and higher limit of the symmetric extended range