Displaying 2 results from an estimated 2 matches for "lat3".
Did you mean:
dat3
2005 Jan 19
1
looking for a basic spatial diff function
...2.0.0
editor: GNU Emacs 21.3.2
front-end: ESS 5.2.3
---------------------------------
Colleagues
Is there a function to calculate distances between adjacent latitude/
longitude pairs in a matrix? It is basically a spatial diff() function that
I have in mind.
Data:
long1, lat1
long2, lat2
long3, lat3
looking for: diff(data$long, data$lat)
function Result
long1, lat1
long2, lat2, distance = long/lat2 - long/lat1
long3, lat3, distance = long/lat3 - long/lat2
I've probably missed it but a search of the maillist archives and quick scan
of the packages (map*) did not solve my query. For this...
2012 Dec 19
1
"For" loop and "if" question
All -
I have a large data frame that looks like
ID p1 p2 p3...p20 Lat1 Lat2 Lat3...Lat20
Long1 Long2 Long3...Long20
1 0 0 1 0 NA NA 29.xx NA
NA NA -89.xx NA
2 1 0 0 1 27.xx NA NA 29.00
-88.00 NA NA -89.xx
3 0 0 0 0 NA N...