Learn R Programming

automatedRecLin (version 1.0.1)

abs_distance: Absolute Distance Comparison Function

Description

Creates a function that calculates the absolute distance between two values.

Usage

abs_distance()

Arguments

Value

Returns a function taking two arguments, x and y, and returning their absolute difference.

Author

Adam Struzik

Examples

Run this code
cmp <- abs_distance()
cmp(1, 5) # returns 4

Run the code above in your browser using DataLab