Dammit. Forgot all about that.
Yes, that is the way to do it:
with(dat,
ave(Value, Group, FUN = \(x)min(x, na.rm = TRUE)))
Thanks for resolving my nonsense.
-- Bert
On Thu, Aug 29, 2024 at 2:58 PM Jeff Newmiller via R-help <
r-help@r-project.org> wrote:
> Use the ave function.
>
> On Augu
Use the ave function.
On August 29, 2024 2:29:16 PM PDT, Bert Gunter wrote:
>Petr et.al:
>
>I think using merge is a very nice idea! (note that the email omitted the
>last rows of the result, though your code of course produced them)
>
>The only minor problem is that the order of the rows in the
Petr et.al:
I think using merge is a very nice idea! (note that the email omitted the
last rows of the result, though your code of course produced them)
The only minor problem is that the order of the rows in the result is
changed from the original. If the OP needs to preserve the original
orderi
3 matches
Mail list logo