?which.min
> x
RI Value
1 1 10
2 2 11
3 3 8
4 4 4
5 6 12> which.min(x$Value)
[1] 4>
On 7/5/07, Anup Nandialath <anup_nandialath@yahoo.com>
wrote:>
> Dear Friends,
>
> Suppose I have a vector as follows
>
> RI Value
>
> 1 10
> 2 11
> 3 8
> 4 4
> 6 12
>
> I would like a function which returns the"row index number" for
the
> minimum value of VALUE. Can somebody please give me some direction on how I
> can do this. In effect I'm trying to find a comparable function for the
> GAUSS command "minindc"
>
> >From the GAUSS Manual
>
> minindc:
> Returns the row number of the smallest element in each column of a matrix
>
>
> Thanks in advance
>
> Anup
>
>
> ---------------------------------
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem you are trying to solve?
[[alternative HTML version deleted]]