# \donttest{
## generate two data points
# one randomly and another on the north pole
x = stats::rnorm(3)
x = x/sqrt(sum(x^2))
y = c(0,0,1)
## compute the rotation
Q = rotationS2(x,y)
## compare
Qx = as.vector(Q%*%x)
## print
printmat = rbind(Qx, y)
rownames(printmat) = c("rotated:", "target:")
print(printmat)
# }
Run the code above in your browser using DataLab