Micah P. Dombrowski / Aug 09 2019

TOPLAS19 Rmd Processing

Intro, plus insert an empty R cell so that we get an R runtime on import.

This is an attempt to reproduce the data processing and analysis from [this paper](https://arxiv.org/abs/1901.10220), from its associated [Github repo](https://github.com/PRL-PRG/TOPLAS19_Artifact), itself a reproducibility study on an earlier paper.  The initial method used was to concatenate all of the \`.Rmd\` (R markdown) files in the repo's root directory into one file, and then import this file into Nextjournal. The result will have data and library codes filled in, formatting issues corrected, and any required code changes made to get processing running and results displayed will be annotated.

# nothing

Process files, creating a base file with the intro text, then for each .Rmd file:

  • cat -s strips repeated empty lines
  • sed removes extraneous directives, markup, and code cell options
  • perl increases header levels by one, outside of code cells
  • sed converts titles to first-level headers
cd toplas
cat /intro.Rmd > Method.Rmd

for file in original_artifact.Rmd repetition.Rmd re-analysis.Rmd \
  permutations.Rmd missing_commits.Rmd commit_survey.Rmd \

  cat -s $file | \
  sed '/^output:.*/d
       /^  html_document:/d
       /^    df_print: paged/d
      s/```{r[^}]*}/```{r}/' | \
  perl -pe '
    $incode //= 0;
    if (/^```/) {
      $incode = ($incode+1)%2;
    } elsif (!$incode) {
      s/^### /#### /;
      s/^## /### /;
      s/^# /## /;
    }' | \
    sed "s/^title: \"*\([^\"]*\)\"*/# \1 ($file)/" >> Method.Rmd


cp Method.Rmd /results/