[R] Function to find angle between coordinates?

Erik Iverson eiverson at NMDP.ORG
Tue Sep 1 17:07:32 CEST 2009


?atan2 is a possible starting point. 

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of clair.crossupton at googlemail.com
Sent: Tuesday, September 01, 2009 8:09 AM
To: r-help at r-project.org
Subject: [R] Function to find angle between coordinates?

Dear all,

I was doing some self study and was wondering if a function already
exists which allows one to determine the angle between points.  e.g.
given the following (x,y) coordinates

input: (0,1); (0,0); (1,0)

would result in:

output: 90 degrees

Best regards
C.C.

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list