Created
October 12, 2017 16:25
-
-
Save jkaupp/b745ee7af12afd1730ee40cf15fc9022 to your computer and use it in GitHub Desktop.
CEAB Document stats
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
ceab_docs <- list.files('~/owncloud/feas/ceab/ceab reports/2016', pattern = ".pdf", full.names = TRUE, recursive = TRUE) | |
library(pdftools) | |
test <- tibble(dept = stri_extract_first_regex(ceab_docs, "CIVL|CHEE|CMPE|ENPH|ENCH|ELEC|GEOE|MECH|MTHE|MINE"), doc = basename(ceab_docs), path = ceab_docs) %>% | |
mutate(pages = map_dbl(path, ~pdf_info(.x)$pages)) %>% | |
bind_rows(., summarize(., dept = "Total", | |
doc = "Overall", | |
path = NA_character_, | |
pages = sum(pages))) %>% | |
mutate() | |
select(-path) %>% | |
knitr::kable() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment