我有一个看起来像这样的表:
start_table <- data.frame("Water_Year" = c("1903", "1903", "1904", "1904"), "X" = c(13, 11, 12,
15), "Day" = c(1, 2, 1, 2))
(“天”列不参与我的偏斜峰度计算,它只是在我的表中)
我想要一个计算按年份分组的偏斜和峰度值的表:
end_table <- data.frame("Water_Year" = c("1903", "1904"), "Skew" = c("skew_number_here",
"skew_number_here"), "Kurtosis" = c("kurtosis_number_here", "kurtosis_number_here"))
我不知道如何按年份对其进行分组以执行这些计算。