[R] Is it possible to...

Marc Feldesman feldesmanm at pdx.edu
Mon Apr 2 22:14:10 CEST 2001


I have a matrix (1000 x 224) that contains the output from the function 
boot.array.  For each row, there are 224 columns that represent the case 
numbers of the selected individuals from a bootstrap.  The cases are listed 
in selection order, not numerical order.  I'd like to rearrange the cells 
so that every row has the column entries listed ascending numeric order.

I've been able to do the sorting using two explicit for loops, but I cannot 
figure out a vectorized way to do it using apply, order, and/or sort.  Is 
there a clever vectorized way to do this?

Thanks.






=====================
Dr. Marc R. Feldesman
Professor and Chairman
Anthropology Department
Portland State University
1721 SW Broadway
Portland, Oregon 97201
email:  feldesmanm at pdx.edu
phone:  503-725-3081
fax:    503-725-3905
http://web.pdx.edu/~h1mf
PGP Key Available On Request
======================

"Anyway, no drug, not even alcohol, causes the fundamental ills of society.
If we're looking for the source of our troubles, we shouldn't test people
for drugs, we should test them for stupidity, ignorance, greed and love of
power."   P.J. O'Rourke

Powered by Optiplochoerus and Windows 2000 (scary isn't it?)

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list