Displaying 1 result from an estimated 1 matches for "320157".
Did you mean:
32015
2009 Oct 02
6
split-apply question
Hi,
I have a data frame that looks like this:
>x
x1 x2 x3
A 1 1.5
B 2 0.9
B 3 2.7
C 7 1.8
D 7 1.3
I want to "group" by the x1 column and in the case of multiple x$x1 values
(e.g., "B")d, return rows that have the smallest values of x2. In the case
of rows with only one value of x1 (e.g., "A"), return the row as is. How can
I do that?