[R] a question on useage of "table"

Alec Stephenson astephen at efs.mq.edu.au
Wed Jun 23 06:39:10 CEST 2004


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




More information about the R-help mailing list