Skip to content

Instantly share code, notes, and snippets.

View ddotta's full-sized avatar
👋

Damien Dotta ddotta

👋
View GitHub Profile
@ddotta
ddotta / fonctions.R
Last active July 19, 2024 07:14
Script for scraping pdf files with checkboxes (response to https://github.com/ropensci/tabulapdf/issues/165)
# Function to identify checkbox patterns
find_checkboxes <- function(text) {
# Example of pattern: "☒" or "☑" or any other symbol used in the PDF
checkboxes <- grep("✘", text, value = TRUE)
return(checkboxes)
}
create_bdc_tables <- function(text) {
# Split the text into lines