-
-
Save pbiecek/36e8ed48683dc577659e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(pheatmap) | |
| library(tidyr) | |
| library(RColorBrewer) | |
| library(SmarterPoland) | |
| country_jumper_points <- skiJumps2013 %>% | |
| mutate(jumper = paste(jumperSurname, jumperName)) %>% | |
| group_by(jumper, compName) %>% | |
| summarise(max.points = sum(classPoints, na.rm=TRUE)) %>% | |
| group_by(jumper) %>% | |
| filter(sum(max.points, na.rm=TRUE) > 400) %>% | |
| spread(compName, max.points) %>% | |
| as.data.frame() | |
| rownames(country_jumper_points) <- country_jumper_points[,1] | |
| country_jumper_points <- country_jumper_points[,-1] | |
| # how this table looks like | |
| country_jumper_points[1:5,1:5] | |
| # Bischofshofen Engelberg Falun Garmisch-Partenkirchen Innsbruck | |
| # AMMANN SIMON 50 38 32 60 80 | |
| # BARDAL ANDERS 40 105 40 20 18 | |
| # DAMJAN JERNEJ 0 NA 24 9 NA | |
| # DIETHART THOMAS 100 90 14 100 45 | |
| # FREUND SEVERIN 26 11 100 0 16 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment