Learn R Programming

riverdist (version 0.17.0)

pdist: Pythagorean Distance

Description

Pythagorean distance between two points. Called internally.

Usage

pdist(p1, p2)

Value

Distance (numeric)

Arguments

p1

X-Y coordinates of point 1

p2

X-Y coordinates of point 2

Author

Matt Tyers

Examples

Run this code
point1 <- c(1,3)
point2 <- c(4,7)

pdist(point1,point2)

Run the code above in your browser using DataLab