From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xebar Saram Subject: Re: convert rmarkdown (rmd) files to orgmode? Date: Wed, 20 Jul 2016 14:15:16 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11416240ea9e0c05380f506d Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPpTC-0007n9-Kp for emacs-orgmode@gnu.org; Wed, 20 Jul 2016 07:15:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPpTB-0005RG-Aa for emacs-orgmode@gnu.org; Wed, 20 Jul 2016 07:15:18 -0400 Received: from mail-yw0-x233.google.com ([2607:f8b0:4002:c05::233]:36688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPpTB-0005RB-4S for emacs-orgmode@gnu.org; Wed, 20 Jul 2016 07:15:17 -0400 Received: by mail-yw0-x233.google.com with SMTP id u134so41442339ywg.3 for ; Wed, 20 Jul 2016 04:15:17 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Philip Hudson , org mode --001a11416240ea9e0c05380f506d Content-Type: text/plain; charset=UTF-8 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) # required for md to html knit('test.rmd', 'test.md') # creates md file then use pandoc to convert the md files to org: pandoc -o test.org test.md this gives an almost 1:1 org file thx Z On Wed, Jul 20, 2016 at 1:08 PM, Philip Hudson wrote: > pandoc -f markdown -t org myfile.rmd > > On 20 July 2016 at 05:28, Xebar Saram wrote: > > 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 > > > > -- > Phil Hudson http://hudson-it.ddns.net > @UWascalWabbit PGP/GnuPG ID: 0x887DCA63 > --001a11416240ea9e0c05380f506d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
thx phil

the Rmd format is actually qui= te different than md so that conversion didnt go well

<= div>i ended up doing a 2 step conversion:

in = R (via the GUI or through R -e command line), first convert the Rmd files t= o md files:

require(knitr) # required for knitting= from rmd to md
require(markdown) # required for md to html=C2=A0=
knit('test.rmd', 'test.md= ') # creates md file

then use pandoc to co= nvert the md files to org:

pandoc -o test.org =C2=A0test.md = =C2=A0=C2=A0

this gives an almost 1:1 org file


thx

Z

On Wed,= Jul 20, 2016 at 1:08 PM, Philip Hudson <phil.hudson@iname.com>= wrote:
pandoc -f markdown -t org = myfile.rmd

On 20 July 2016 at 05:28, Xebar Saram <zeltakc@gmail.com> wrote:
> 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 form= at so
> it could be very useful to me
>
> best
>
> Z



--
Phil Hudson=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0http://hudson-it.ddns.net
@UWascalWabbit=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0PGP/GnuPG ID: 0x887DCA63

--001a11416240ea9e0c05380f506d--