From leo.lahti at iki.fi  Fri Aug 22 14:42:10 2014
From: leo.lahti at iki.fi (Leo Lahti)
Date: Fri, 22 Aug 2014 14:42:10 +0200
Subject: [Rd] markdown vignette with the vignette command
In-Reply-To: <53F73964.1010303@gmail.com>
References: <CAHm4+KC4yDmHbTMHm7gOSTUzAoqfut4vJ0ZRbOVEeJw5RBm1cw@mail.gmail.com>
	<53F723D9.8010707@gmail.com>
	<CAHm4+KAEUeVwhsrikeiiJ8OYxiLdGN+W7yS1odu9TaXFe2A3aw@mail.gmail.com>
	<53F73964.1010303@gmail.com>
Message-ID: <CAHm4+KAqHahRMt7Pn+jFCnE4CSW+SwZOKwwNSLC+MZWX=PcHBQ@mail.gmail.com>

I followed the instructions in
http://cran.r-project.org/web/packages/knitr/vignettes/knitr-markdown.html

   - add *.Rmd files under the vignettes directory
   - add VignetteBuilder: knitr to the DESCRIPTION file
   - specify the vignette engine \VignetteEngine{knitr::knitr} in the Rmd
   files (inside HTML comments)

Leo


On Fri, Aug 22, 2014 at 2:36 PM, Duncan Murdoch <murdoch.duncan at gmail.com>
wrote:

> On 22/08/2014 8:06 AM, Leo Lahti wrote:
>
>> Solved, thanks!
>>
>>  Could you post a short description of the solution, in case this problem
> arises for anyone else?  These posts are archived, and can be a useful
> resource for others.
>
> Duncan Murdoch
>
>
>> On Fri, Aug 22, 2014 at 1:04 PM, Duncan Murdoch <murdoch.duncan at gmail.com
>> <mailto:murdoch.duncan at gmail.com>> wrote:
>>
>>     On 22/08/2014, 6:09 AM, Leo Lahti wrote:
>>     > Dear list,
>>     >
>>     > we have a markdown vignette for our package in
>>     vignette/vignette.md <http://vignette.md>
>>
>>     >
>>     > This is not visible from within R with the vignette(package =
>>     "mypackage")
>>     > command.
>>     >
>>     > I assume the reason is that the vignette function only shows PDF
>>     vignettes.
>>     > Is there any way to circumvent this and display markdown
>>     vignettes directly
>>     > from within R?
>>     >
>>     > I tried to seek the answer from R archives and search engines
>>     but could not
>>     > find the solution so far.
>>     >
>>
>>     If you are using a current version of R, it should just work.  For
>>     example,
>>
>>     vignette("knitr-markdown")
>>
>>     works for me when knitr is attached.  If knitr was not attached, I'd
>>     have to list it in the pkg argument of the vignette call.
>>
>>     Duncan Murdoch
>>
>>
>>
>

	[[alternative HTML version deleted]]



[Rd] markdown vignette with the vignette command
Leo Lahti