Re: [O] convert rmarkdown (rmd) files to orgmode?

2016-07-21 Thread Charles C. Berry
On Wed, 20 Jul 2016, Xebar Saram wrote: Hi again Chuck: is there a way to modify you nice code regex code snippet to simultaneously change all example blocks to R blocks in a converted rmd>org file? so when executing the block all example blocks: #+BEGIN_EXAMPLE help.search("rnorm")

Re: [O] convert rmarkdown (rmd) files to orgmode?

2016-07-21 Thread Xebar Saram
Hi again Chuck: is there a way to modify you nice code regex code snippet to simultaneously change all example blocks to R blocks in a converted rmd>org file? so when executing the block all example blocks: #+BEGIN_EXAMPLE help.search("rnorm") #+END_EXAMPLE will turn into R blocks

Re: [O] convert rmarkdown (rmd) files to orgmode?

2016-07-20 Thread Xebar Saram
ahh i see what you mean. thats a cool tip yet i find i have to find/replace also for images, find/replace to change example blocks to R code blocks etc which is quite tedious since i have about 50 of these converted Rmd to org files :) ill keep investigating this and report back thx so much for

Re: [O] convert rmarkdown (rmd) files to orgmode?

2016-07-20 Thread Charles C. Berry
On Wed, 20 Jul 2016, Xebar Saram wrote: thx for the tips! when i try to run the source block : #+BEGIN_SRC emacs-lisp :results silent (replace-regexp "^=[{]r \\([^}]*\\)[}]\\(.*\\)=$" "#+name: \\1 ,#+begin_src R \\2 ,#+end_src") #+END_SRC i just get a nil in the message

Re: [O] convert rmarkdown (rmd) files to orgmode?

2016-07-20 Thread Xebar Saram
thx for the tips! when i try to run the source block : #+BEGIN_SRC emacs-lisp :results silent (replace-regexp "^=[{]r \\([^}]*\\)[}]\\(.*\\)=$" "#+name: \\1 ,#+begin_src R \\2 ,#+end_src") #+END_SRC i just get a nil in the message area. what am i missing? thx Z On

Re: [O] convert rmarkdown (rmd) files to orgmode?

2016-07-20 Thread Charles C. Berry
On Wed, 20 Jul 2016, Xebar Saram wrote: thx phil the Rmd format is actually quite different than md so that conversion didnt go well I tried this pandoc -f markdown -t org input-file.Rmd -o output-file.org then I opened `output-file.org' and put this src block at the very top:

Re: [O] convert rmarkdown (rmd) files to orgmode?

2016-07-20 Thread Xebar Saram
thx phil the Rmd format is actually quite different than md so that conversion didnt go well i ended up doing a 2 step conversion: in R (via the GUI or through R -e command line), first convert the Rmd files to md files: require(knitr) # required for knitting from rmd to md require(markdown) #

[O] convert rmarkdown (rmd) files to orgmode?

2016-07-19 Thread Xebar Saram
Hi all anyone know of a way to convert rmarkdown (rmd) files to orgmode? im preparing a R course and lots of cool examples in R are in rmd format so it could be very useful to me best Z