Skip to content
Back to formatted view

Raw Message

Message-ID: <s0d9961e.013@efs04.efs.mq.edu.au>
Date: 2004-06-23T04:39:10Z
From: Alec Stephenson
Subject: a question on  useage of "table"

as.numeric(names(sv)) is one way.

>>> Yong Wang <wang at galton.uchicago.edu> 06/23/04 02:14pm >>>
Hi, all
the question is as follows
> v
 [1] 1 2 3 4 5 2 3 4 5 6
> sv<-sort(table(v))
> sv
v
1 6 2 3 4 5 
1 1 2 2 2 2 


what is the easy and quick way to extract the numerical vector 
(1,6,2,3,4,5)
from sv?

thank you in advance for any suggestion.
regards
y.w

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help 
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html