Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > df <- data_frame(name = c("A","B","C","D"), count = c(1,3,5,2), avg = c(100,50,20,10))
- > df
- # A tibble: 4 × 3
- name count avg
- <chr> <dbl> <dbl>
- 1 A 1 100
- 2 B 3 50
- 3 C 5 20
- 4 D 2 10
- 10 10 20 20 20 20 20 50 50 50 100
- > median(df$avg)
- [1] 35
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement