DistancePointSegment <-
function(px,py,x1,y1,x2,y2)
{
closest <- ClosestPoint(px,py,x1,y1,x2,y2)
dist <- LineMagnitude(px, py, closest[[1]],closest[[2]])
dist
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.