Trying to find the median of specific groupings

Hi all,

I'm working from a master dataset that contains full dates which I have made another variable for that contains only years and a variable that contains a geometric mean for each observation.

What I am trying to do is find the median of the geometric mean "GM" of my grouping of beaches "BEACH" for each year "DATEyyyy". But I'm just lost of how to set that code up. The dataset is "m_data".

This is what I've been trying to run but I can't find good info on this:
median(m_data$GM + m_data$BEACH + m_data$DATEyyyy)

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.