Skip to content

Instantly share code, notes, and snippets.

@jalapic
Created May 29, 2015 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jalapic/23c874d593bcb61f24eb to your computer and use it in GitHub Desktop.
Save jalapic/23c874d593bcb61f24eb to your computer and use it in GitHub Desktop.
library(engsoccerdata)
library(dplyr)
library(magrittr)
tmp <- engsoccerdata2 %>%
filter(tier==4) %$%
split(.,Season) %>%
lapply(., maketable) %>%
lapply(.,data.frame) %>%
lapply(., function(x) x$team) %>%
lapply(., function(x) tail(x,1)) %>%
do.call('c',.)
engsoccerdata2 %>% filter(home %in% tmp) %>% filter(tier==1) %>% .$home %>% unique
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment