I wrote: I found myself wishing for a function to rotate a vector. Is there one? I know about ?lag, but help.search("rotate") didn't find anything to the point.
Here I was regarding a vector as a _sequence_. The (one-step) rotation of c(u,v,w,x,y,z) is c(v,w,x,y,z,u). This is pretty much the way APL uses the word "rotate" (the vertical-bar-overstruck-with-a-circle operator). Spencer Graves <[EMAIL PROTECTED]> replied: I didn't study your code, but regarding a function to rotate a vector: Multiplication by an orthogonal matrix does that. This is a misunderstanding. We were both using the word "rotate" in a standard way, the problem is that it has more than one "standard" meaning. As a matter of fact, / 0 1 0 0 \ / u \ / v \ | 0 0 1 0 | | v | | w | | 0 0 0 1 | | w | = | x | \ 1 0 0 0 / \ x / \ u / so you *can* do the kind of rotation I want using a matrix multiplication, and this is mathematically useful; it's just not a very good way to do it in a computer. ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help