Commit Graph

6 Commits

Author SHA1 Message Date
Dan Davison 3547a6b64d org-babel: further cleaning of parameter-passing to language files
Also update docstrings of language execution functions to reflect
changes.
2009-11-10 15:23:26 -07:00
Eric Schulte 0fa68a53ba org-babel: language specific files using cleaner parameter passing 2009-11-10 15:23:18 -07:00
Dan Davison 64c26c6561 org-babel: remove prompt characters from R output
When evaluating R code in a persistent session, lines of output
typically start with a single prompt character. However, under certain
circumstances, lines start with a concatenation of (primary and
secondary) prompt characters separated by spaces. This seems to be
related to having blank lines in the input. This fix ensures that all
such prompt characters are removed from the output.
2009-10-19 23:34:13 -04:00
Dan Davison 8ca34cba0b org-babel: alter R tangling defaults
Use "#!/usr/bin/env Rscript", and use ".R" instead of ".r".
2009-10-19 21:44:41 -04:00
Dan Davison 8b52bf09e0 org-babel: capture graphical output from R
If a [:file filename.ext] header arg is provided, then all graphical
output from the source block is captured on disk, and output of the
source block is a link to the resulting file, as with the
graphics-only languages such as gnuplot, ditaa, dot, asymptote. An
attempt is made to find a graphics device corresponding to the file
extension (currently .png, .jpg, .jpeg, .tiff, .bmp, .pdf, .ps,
.postscript are recognised); if that fails, png format output is
created.

Additionally, values for several arguments to the R graphics
device can be passed using header args:

:width :height :bg :units :pointsize
:antialias :quality :compression :res :type
:family :title :fonts :version :paper :encoding
:pagecentre :colormodel :useDingbats :horizontal

Arguments to the R graphics device that are not supported as header
args can be passed as a string in R argument syntax, using the header
arg :R-dev-args

An example block is (although both bg and fg can be passed directly as
header args)

\#+begin_src R :file z.pdf :width 8 :height 8 :R-dev-args bg="olivedrab", fg="hotpink"
  plot(matrix(rnorm(100), ncol=2), type="l")
\#+end_src
2009-10-19 21:44:28 -04:00
Eric Schulte c0554c7753 merging with the org-babel repository 2009-09-11 13:44:05 -06:00