emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Omitting try/catch blocks from tangled R code?


From: John Hendy
Subject: [O] Omitting try/catch blocks from tangled R code?
Date: Fri, 7 Feb 2014 00:18:38 -0600

Greetings,


I don't usually tangle, but am creating a code file to go along with a
presentation I'm giving this weekend so that attendees can try things
out afterward by cloning my github repo where all the data and
necessary files are stored.

In my presentation (Beamer), I create plots via the R pdf() device,
and noticed that all of the tangled code where plots are generated
contains the following:

pdf(file="file.pdf"); tryCatch({

  code block contents here

},error=function(e){plot(x=-1:1, y=-1:1, type='n', xlab='', ylab='',
axes=FALSE); text(x=0, y=0, labels=e$message, col='red');
paste('ERROR', e$message, sep=' : ')}); dev.off()

Is there a way to omit this?

I'm guessing this is here to create a blank plot with the error as the
output when something goes awry?

I checked around variable completions of org-babel-tangle-* and
searched google for terms like "org babel tangle try catch" but am not
finding anything that looks like what I need.


Thanks,
John



reply via email to

[Prev in Thread] Current Thread [Next in Thread]