I am looking to calculate proportions from count data based on multiple variables. In the example dataset below, I want to know the proportion of each score for each species at each date. For example, for all MCAP on 2019-09-16, what proportion are 2's?
structure(list(date = structure(c(18155, 18155, 18155, 18155,
18155, 18155, 18155, 18155, 18171, 18171, 18171, 18185, 18185,
18185, 18185, 18185, 18185, 18185, 18185, 18185), class = "Date"),
species = c("MCAP", "MCAP", "PCOM", "MCAP", "MCAP", "MCAP",
"PCOM", "PCOM", "PCOM", "PCOM", "PCOM", "MCAP", "MCAP", "MCAP",
"MCAP", "PCOM", "PCOM", "PCOM", "PCOM", "PCOM"), score = c(2,
2, 2, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3)), row.names = c(1L,
2L, 3L, 4L, 8L, 33L, 37L, 38L, 7912L, 7931L, 7947L, 8543L, 8544L,
8545L, 8547L, 12946L, 12947L, 12948L, 12949L, 12950L), class = "data.frame")