Skip to content

Instantly share code, notes, and snippets.

View mnazarov's full-sized avatar

Maxim Nazarov mnazarov

View GitHub Profile
@mnazarov
mnazarov / docx_flextable.Rmd
Last active March 1, 2018 23:59
Use flextable with rmarkdown for Word (docx) output
---
title: "Insert `flextable`s into Word documents generated with `rmarkdown`"
author: Maxim Nazarov
output:
word_document:
keep_md: yes
html_document:
keep_md: yes
smart: false
---
## Check all three-letter acronyms (TLA) in Wikipedia
## Assuming TLA is unused if no wikipedia entry with its name exists
library(rvest)
# splits from https://en.wikipedia.org/wiki/Wikipedia:TLAs
ranges <- c("AAA_to_DZZ", "EAA_to_HZZ", "IAA_to_LZZ", "MAA_to_PZZ", "QAA_to_TZZ", "UAA_to_XZZ", "YAA_to_ZZZ")
baseUrl <- "https://en.wikipedia.org/wiki/Wikipedia:TLAs_from_"
all <- c()