'''(r) ggplot(aes(x = age, y = friends_initiated), data = pf) geom_point(alpha = 1/10, position = 'jitter') '''
age_groups <- group_by(pf, age) pf.fc_by_age <- summarise(age_groups, friend_count_mean = mean(friend_count), friend_count_median = median(friend_count), n = n()) pf.fc_by_age <- arrange(pf.fc_by_age, age) head(pf.fc_by_age)