I have been trying to sum my rasterlayers from my rasterstack for each month by their respective years. Similarly to this thread here: Sum nlayers of a rasterStack in R