[R] orientlib

Duncan Murdoch murdoch at stats.uwo.ca
Mon Oct 1 12:50:35 CEST 2007


On 01/10/2007 3:31 AM, Abu Naser wrote:
> Hi all users,
> 
> I want to calculate angles from two vector using quaternion. I believe , it is possible using orientlib. Since
> I am not an quaternion expart, I need assistance to make sure I am not doing anything wrong. Could anyone please
> expain it how to do it using orientlib.

 > x <- quaternion(c(1,0,0,0))
 > y <- quaternion(c(0,1,0,0))
 > rotation.distance(x,y)
[1] 3.141593

But this doesn't calculate angles between vectors, it calculates angles 
between orientations.  See

Murdoch, D. (2003). Orientlib: an R package for orientation data. 
Journal of Statistical Software, 8(19), 1-11.

for details.

Duncan Murdoch



More information about the R-help mailing list