abs_distance.Rd
Creates a function that calculates the absolute distance between two values.
abs_distance()
Returns a function taking two arguments, x and y, and returning their absolute difference.
x
y
Adam Struzik
cmp <- abs_distance() cmp(1, 5) # returns 4 #> [1] 4