Skip to content
Prev 333260 / 398506 Next

Calculate Range

On 11/17/2013 08:49 AM, SCRIPTHAM wrote:
Hi Scriptham,
It looks like you want to get the difference between the maximum and 
minimum values rather than the actual values. Define a function:

range_span<-function(x) return(diff(range(x)))

and use that as the FUN argument.

Jim