On Tue, 22 Jun 2004, Yong Wang wrote:
> 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?
>
> as.numeric(names(sv))
[1] 1 6 2 3 4 5
David Scott
_________________________________________________________________
David Scott Department of Statistics, Tamaki Campus
The University of Auckland, PB 92019
Auckland NEW ZEALAND
Phone: +64 9 373 7599 ext 86830 Fax: +64 9 373 7000
Email: [EMAIL PROTECTED]
Graduate Officer, Department of Statistics
______________________________________________
[EMAIL PROTECTED] 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