[R] Does this exist: diff(range(VAR, na.rm=T))
Dennis Fisher
||@her @end|ng |rom p|e@@th@n@com
Wed Jun 25 20:11:11 CEST 2025
Version 4.4.2
OS X
Colleagues
I often need to determine the span of the x-variable in a graphic.
This is easy to determine with:
diff(range(VAR, na.rm=T))
I am not aware of any function in base R that accomplishes this and “span” is not taken.
Would it be possible to add such a function? Not a major addition but often useful.
Dennis
Dennis Fisher MD
P < (The "P Less Than" Company)
Phone: 1-415-307-4791
www.PLessThan.com
[[alternative HTML version deleted]]
More information about the R-help
mailing list