Rainer M Krug <r.m.k...@gmail.com> writes: > Hi > > I would like to do make the file header argument to be concatenated of a > constant string and > another variable, so effectively: > > #+header: :var+ ConNum="10" > #+header: :results graphics > #+header: :file SA_VALUEOFConNum.pdf > #+header: :width 8 > #+header: :height 8 > #+header: :pointsize 8 > #+begin_src R > plot(runif(100)) > #+end_src > > #+RESULTS: > [[file:SA_10.pdf]] > > Is this possible? > > Thanks, > > Rainer
Hi Rainer, I am not aware of any method that directly does what you want. But depending on where the value of your variable ConNum is coming from, the following might be a start for you. It is based on the possibility to insert elisp in the header arguments: #+name: myconnum - 19 #+header: :var ConNum=myconnum #+header: :results graphics #+header: :file (concat "SA_" (sbe myconnum) ".pdf") #+header: :width 8 #+header: :height 8 #+header: :pointsize 8 #+begin_src R plot(runif(100), main=ConNum) #+end_src #+RESULTS: [[file:SA_(19).pdf]] Best, Andreas