jeroenjanssens/data-science-at-the-command-line — pull request #18 by mpettis (2014-10-13 05:38:51+00:00)
Title: Rio mac

Two changes:

1: Use triple-backslash-n in the cat call in callR function. Original formulation, with one-backslash-n in the call was causing an error, because I believe that bash was interpolating this to an actual newline in the code, not the backslash-n sequence to pass to Rscript. Should be tested on Linux, but works on Mac.

2: Creation of temp files left two empty files, one with name of OUT but without the .png suffix, and one with the name of ERR but without the .err suffix. Added call in trap call to clean up those files, as I cannot figure out a portable way to just create single temp files with .png and .err suffix, as the --suffix arg to `mktemp` is not universal.