[R] alternative to table

Jason Turner jasont at indigoindustrial.co.nz
Wed May 15 10:19:52 CEST 2002


On Wed, May 15, 2002 at 08:32:23AM +0200, Jan Malte Wiener wrote:
> hi,
> i have a matrix with repeated measures of subjects, e.g. (col 1 =
> subject, col 2 = data)
> 
> x=
> 1	7
> 1	6
> 1	9
> 2	8
> 2	9
> 2	2
> 3	4
> 3	5
> 3	3
> 
> i now would like to have a vector that only carries the different values
> of column 1 (only one entry per value -> (1,2,3)).

unique(x[,1]) should work nicely.

Cheers

Jason
-- 
Indigo Industrial Controls Ltd.
64-21-343-545
jasont at indigoindustrial.co.nz
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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