I am trying to somehow use a local variable in org-mode for when I write my R code. So essentially in have this chunk that I want to automatically manage for each file.
#+BEGIN_SRC R :file /Users/ashok/Documents/plots/wtdup.png pairs.panels(tmpDat.cpm.log[,c(1:4,17:20)],) #+END_SRC
in the chunk above I want to be able to replace the value for the :file with a path to the plots folder that could change. So I tried to use the local variable approach as below
* LOCAL VARS ## Local Variables: ## mode: org ## plotfolder: "/Users/DataAnalysis/FinalAnalysisMay2016/plots" ## End:
and then replace the :file parameter with
#+BEGIN_SRC R :file (eval 'plotfolder)"/truseq_comp_logcpm_pairwise_wtdup.png" pairs.panels(tmpDat.cpm.log[,c(5,7,8,21:23)], ) #+END_SRC
Now when I evaluate the chunk ( after reverting my buffer to make the local variable active), the result includes only the value of the plotfolder variable and not the concatenated version as I wanted. in this case my results would show up as
but what i really want is
If anyone has any suggestions as to how I can go about this it would be great, since then I can move the same files between machines when I am working on cleaning up the results.