Skip to content

Instantly share code, notes, and snippets.

@giacecco
Last active August 29, 2015 14:25
Show Gist options
  • Select an option

  • Save giacecco/58b190b6397cf2a8a9e7 to your computer and use it in GitHub Desktop.

Select an option

Save giacecco/58b190b6397cf2a8a9e7 to your computer and use it in GitHub Desktop.
# calculated a weighted average of the max aon vs its frequency
temp <- max_aon_by_street %>% group_by(max_aon) %>% summarise(frequency = n())
representative_max_aons <- weighted.mean(temp$max_aon, temp$frequency)
# ... and display
representative_max_aons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment