I have a dataframe of
years, latitude, longitude
1971, 30.212, -87.423
1971, 30.211, -87.455
1971, 30.111, -94.444
1972, 24.114, -94.231
1972, 25.114, -92.121
I want to find the standard distribution for the latitude column by year, such that a new column is created, and would have a repeating standard distribution for each instance of 1971, and a different sd for 1972, etc.
I believe this may be somewhere in the dplyr universe? having difficulties with this one.
In a logical experession, I am asking: what is the standard deviation for df$latitude
, WHEN df$years
= "all Patterns (being years)"