Skip to content

Instantly share code, notes, and snippets.

View antaldaniel's full-sized avatar

Daniel Antal antaldaniel

View GitHub Profile
@antaldaniel
antaldaniel / 00.README.md
Created May 6, 2021 23:40 — forked from rmoff/00.README.md
RMarkdown - repeating child block with changing variable value

When you use knit_expand it appears that the inclusion of the Rmd is done on the first pass, and then the complete document evaluated. This means that a Rmd block referenced in loop with knit_expand will only evaluate changing variables at their last value.

This can be worked around by passing the literal value of the variable at the time of the knit_expand with {{var}} syntax.

This is documented in the knitr_expand docs, but less clear (to an R noob like me) for embedded documents rather than strings.

@antaldaniel
antaldaniel / NGA_coverage-ISO2.csv
Created October 2, 2016 16:30 — forked from stared/NGA_coverage-ISO2.csv
Plot of Europe (choropleth) in R/ggplot, using NUTS data
CountryCode NGA_Coverage
MT 100
BE 98.84
NL 98.41
LT 97.29
LU 94.42
DK 91.7
LV 89.58
PT 89.11
UK 88.55