Thanks John! I got it.

On 10/21/06, John Kane <[EMAIL PROTECTED]> wrote:
>
>
> --- tom soyer <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I noticed that max(x) returns the maximum value of a
> > vector, but the
> > function doesn't give the user the option of
> > retrieving the row index number
> > instead. If I used max(x) to find the maximum value
> > of vector x, then is
> > there a function I can use to find the index number,
> > or row name, of the
> > maximum value?
> >
> > Thanks,
> >
> > Tom
> ?which
>
> Is this what you want to do?
> xx <- c(1,2,3,4,9,6,7,5)
> bb <- max(xx)
> bb
> which(xx==bb)
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to