I have a set of coordinates that I want to turn into an angle and do some Anova analysis. I used maptools trackAzimuth function to do it, but I keep losing one or two points. I assume it calculates angles between two coordinates. But I want 1 point (angle) on 1 latitude and longitude, for example at [-80.222, 30.555 to 45]. Since my longitude is in North America, it is in a negative value, do we have to convert into positive before converting it into angle? Please enlighten me on this. Following is my data;
Longitude Latitude
-104.952 39.71478
-104.952 39.7149
-104.54 39.7148
-104.955 39.70441
-104.966 39.7175
My codes:
setwd("C:/Users/data")
install.packages("maptools")
library(maptools)
data <- read.table("data.csv", header = T, sep = ",")
dfr<-data.frame(data[3:4])
angle<-data.frame(trackAzimuth(as.matrix(dfr)))
My results is: Angle -81.001 -95.57075 -175.254 -32.628 Here, I lost 1 latitude and longitude. And my angles are negative, I want positive angles on this. How do I do it? Please help.
Thanks