How to get maximum or minimum value by each group in R

Here is a quick and easy way hot to get the maximum or minimum value within each group in R in separate columns. Let’s take a look at the data set with NA values, which makes it a little bit harder.

Exit mobile version