title: R/GIS: Find orthogonal distance between a location and nearest line
body: <p>I am trying to find the orthogonal distance between a set of location coordinates and a set of lines (roads or rivers). The set of points are in the form of latitude/longitude pairs, and the lines are in a shapefile (.shp). Plotting them on a map is not a problem, using either <code>maptools</code> or <code>PBSmapping</code>. But my basic problem is to find the minimum distance one has to travel from a location to reach a road or a river. Is there any way to do this in R?</p>