README.md 576 Bytes
Newer Older
Holger Brandl's avatar
Holger Brandl committed
1 2 3 4 5 6 7 8 9 10 11 12 13
# rnblight

Update markdown result chunks in markdown documents

```bash
cd /Users/brandl/Dropbox/projects/datautils/R/rnblight
#cp /Users/brandl/Dropbox/documents/datascience/chi2.md rerender/
#cp -r /Users/brandl/Dropbox/documents/datascience/.chi2_images rerender/
#
#git init
#git add chi2.md
#git commit -m "initial commit"

Holger Brandl's avatar
Holger Brandl committed
14
mdInput=example.md
Holger Brandl's avatar
Holger Brandl committed
15 16
mdBase=$(basename $mdInput .md)

Holger Brandl's avatar
Holger Brandl committed
17 18 19 20 21
cp $mdInput ${mdBase}.Rmd


kscript --idea strip_chunk_results.kts
kscript  strip_chunk_results.kts ${mdBase}.md
Holger Brandl's avatar
Holger Brandl committed
22

23
Rscript - <<"EOF"
Holger Brandl's avatar
Holger Brandl committed
24 25 26 27 28
knitr::knit('${mdBase}.Rmd', '${mdBase}.md')
EOF

idea .

Holger Brandl's avatar
Holger Brandl committed
29

Holger Brandl's avatar
Holger Brandl committed
30
```