Skip to content

return min and max with conditions

2 messages · Thiago A. Pires, Bede-Fazekas Ákos

#
I'm trying to automate a process in R, but I still can't get to what I
need. I have two data-frames indexed from the same code in the lines, which
would be the samples, one data-frame identifies the species that occur in
the samples and the other identifies the environmental variables of these
samples. I need the minimum and maximum of environmental variables to be
returned according to two conditions, the maximum or minimum returned has
to search for samples and group by species. All available packages and
scripts that I've checked don't do what I need, does anyone have any ideas?

Thanks.

Thiago
#
Dear Thiago,
a reproducible example and a desired output would help us to understand 
and solve the problem. The description was not clear, at least, for me.
But it seems to be a simple apply/lapply/aggregate/by task that can be 
solved without installing packages.
Best wishes,
?kos Bede-Fazekas
Centre for Ecological Research, Hungary


2022.02.16. 16:38 keltez?ssel, Thiago A. Pires ?rta: