Skip to content

Instantly share code, notes, and snippets.

View nniiicc's full-sized avatar

Nic nniiicc

View GitHub Profile
@nniiicc
nniiicc / pdftools_tables.R
Created May 14, 2019 15:59 — forked from erichare/pdftools_tables.R
Extract Tables from PDF with PDFTools 2.0
library(pdftools)
library(tidyverse)
parse_tables <- function(url, remove_last = TRUE) {
my_data <- pdf_data(url)
lapply(my_data, function(my_data2) {
header_row <- my_data2 %>%
filter(y == min(y))
dotchart2.CIs =
function (data, labels, groups = NULL, gdata = NA, horizontal = TRUE,
pch = 16, xlab = "", ylab = "", auxdata, auxgdata = NULL,
auxtitle, lty = if (.R.) 1 else 2, lines = TRUE, dotsize = 0.8,
cex = par("cex"), cex.labels = cex, cex.group.labels = cex.labels *
1.25, sort. = TRUE, add = FALSE, dotfont = par("font"),
groupfont = 2, reset.par = add, xaxis = TRUE, width.factor = 1.1,
lcolor = if (.R.) "gray" else par("col"), ...)
{
if (.R. && !add) {