Возможно что-то вроде:
df <- read.table(text = "
Lat Long Date Value.
30.497478 -87.880258 01/01/2016 10
30.497478 -87.880258 02/02/2016 15
30.497478 -87.880258 02/05/2016 20
33.284928 -85.803608 01/02/2016 10
33.284928 -85.803608 01/03/2016 15
33.284928 -85.803608 01/05/2016 20", header = T)
df$Season <- cut(as.numeric(substr(df$Date, 4, 5)), c(1,4,7,10,12), c(1,2,3,4), include.lowest = T)
library(dplyr)
options(pillar.sigfig = 6) # to prevent Lat and Long to be rounded
df %>%
group_by(Lat, Long, Season) %>%
select(-Date) %>% # since all other variables all grouping vars, just deselect Date
summarise_all(funs(mean, median, sd))
Lat Long Season mean median sd
<dbl> <dbl> <fct> <dbl> <dbl> <dbl>
1 30.4975 -87.8803 1 12.5000 12.5000 3.53553
2 30.4975 -87.8803 2 20.0000 20.0000 NaN
3 33.2849 -85.8036 1 12.5000 12.5000 3.53553
4 33.2849 -85.8036 2 20.0000 20.0000 NaN
Обратите внимание, что для 2-го сезона sd не может быть задано, так как в данных выборки есть только одно значение для каждой комбинации Lat & Long.