Message-ID: <x28z9h8ns8.fsf@blueberry.kubism.ku.dk>
Date: 2002-02-25T17:38:31Z
From: Peter Dalgaard
Subject: another basic ?
In-Reply-To: <4.3.2.7.2.20020225120152.00a9d100@pop.service.ohio-state.edu>
jimi adams <adams.644 at osu.edu> writes:
> i am sure that there is a simple solution that i am just overlooking,
> but there is no logical test for =
> there is one for != and >,<, >=, <=...
> what do i do if i need to check if something IS EQUAL
Double it: ==
> or is there an easy way, in working with a matrix of size n x 3, to
> sort the matrix by one of the columns?
>
> specifically what i am trying to do is i have a matrix with individual
> and group labels that is randomly generated, and is by default sorted
> by the individual labels ( column 1) and i want them to be organized
> into unique group labels (comlumn 2)
> thanks
m[order(m[,2]),]
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._