Re: [R] Two ?'s:Permuting a data matrix and projection operator

About this list Date view Thread view Subject view Author view Attachment view

From: Achim Zeileis (zeileis@ci.tuwien.ac.at)
Date: Thu 20 Sep 2001 - 18:07:20 EST


Message-id: <3BA9A3B8.522437A@ci.tuwien.ac.at>


"J. Wan" wrote:
>
> Hi!
>
> I have two questions:
>
> 1. Is there an easy way/algorithm to obtain a series of permutated data
> matrices which are obtained by permuting all the elements within each row?
>
> Or is there a function that can permute all the elements for each row
> instead of the whole matrix?

sample() can do random permutations, so if you want a permutation of the
elements within each row of a matrix X, this 

t(apply(X,1,sample))

could do the job
Z

> 2. Is there a function which helps find a matrix... projection operator
> from p dimensional to p-1 dimensional subspace orthogonal to x, a real
> number?
>
> Thanks for your help!
>
> **********************************************************
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Thu 17 Jan 2002 - 11:10:06 EST