Hi, I am fairly new R user, trying to do something relatively simple.
I have a small dataset of individual bee species counts. I am simply trying to get the sum for each site for each m_y (which is a trapping event).
I first made columns into factors.
I have not been able to figure out if I use "group_by" or "filter" to run this?
mth m_y event trap site taxa counts normalized units
1 Jan Jan-18 1 NE-1 NE Agapostemon 1 0.111 number/day
2 Jan Jan-18 1 NE-2 NE Lasioglossum dialictus 2 0.222 number/day
3 Jan Jan-18 1 NW-1 NW Lasioglossum dialictus 12 1.33 number/day
4 Jan Jan-18 1 NW-1 NW Apis mellifera 2 0.222 number/day
5 Jan Jan-18 1 NW-2 NW Augochlorella 1 0.111 number/day
6 Jan Jan-18 1 NW-2 NW Lasioglossum dialictus 6 0.667 number/day
My code: by.site <- bees %>% group_by(m-y, site) #> Error in bees %>% group_by(m - y, site): could not find function "%>%" summarise(sum.normal = sum(normalized)) #> Error in summarise(sum.normal = sum(normalized)): could not find function "summarise"