From murdoch.duncan at gmail.com  Thu Feb  1 16:20:16 2018
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Thu, 1 Feb 2018 10:20:16 -0500
Subject: [Rd] Best practices in developing package: From a single file
In-Reply-To: <CAO1zAVYnHx_TFcZBvynQ8GRX_fRadpqRipgk-731G-X5BXO29w@mail.gmail.com>
References: <CAPtbhHwLXvdCX+1PJvEAyjWtcaVf=k4kL2fgXNhxLqfBhoJg-Q@mail.gmail.com>
 <1517329742.15543.15.camel@braverock.com>
 <aef83954-b118-6f8f-6d4f-d2a9758121cc@gmail.com>
 <CY4PR2001MB10641A6B87B06111469FDBD0BEE40@CY4PR2001MB1064.namprd20.prod.outlook.com>
 <23152.57287.697853.990831@rob.eddelbuettel.com>
 <CAPekMCkWYvdGJ=wXA3bGFs655xsV6RUFCCjFpcpZ4rjmB8u-VQ@mail.gmail.com>
 <a8fbf26f-5a4c-3526-68a5-e062a596313c@gmail.com>
 <CABdHhvGGCpjFa-dPiK6fHLfVzCzZ3PboGSH9c8Jy+daW14vSNg@mail.gmail.com>
 <89bbc3b2-b173-961d-5cd2-fc83c05600dc@gmail.com>
 <aacda07a-836c-313d-5cc9-c32a5d178f7f@gmail.com>
 <CAO1zAVYnHx_TFcZBvynQ8GRX_fRadpqRipgk-731G-X5BXO29w@mail.gmail.com>
Message-ID: <58b63a61-ae71-3fd3-57b7-1424bf1cfdab@gmail.com>

On 01/02/2018 7:44 AM, Joris Meys wrote:
> 
> 
> On Thu, Feb 1, 2018 at 1:29 PM, Duncan Murdoch <murdoch.duncan at gmail.com 
> <mailto:murdoch.duncan at gmail.com>> wrote:
> 
>     On 31/01/2018 6:59 AM, Duncan Murdoch wrote:
> 
>         On 30/01/2018 11:39 PM, Hadley Wickham wrote:
> 
>      ?[ lots deleted ]
> 
>             Personally, I don't find writing in comments any harder than
>             writing
>             in .Rd files, especially now that you can write in markdown
>             and have
>             it automatically translated to Rd formatting commands.
> 
> 
>         I didn't know about the possibility of Markdown.? That's a good
>         thing.
>         You didn't say what editor you use, but RStudio is a good guess,
>         and it
>         also makes it easier to write in comments.
> 
> 
>     I've taken a look at the Markdown support, and I think that is
>     fantastic.? I'd rather it wasn't inline in the .R file (does it have
>     to be?), but I'd say it tips the balance, and I'll certainly
>     experiment with using that for new projects.
> 
> 
> You don't have to put the Rmarkdown in the .R file of the function, 
> there are ways to keep them in separate files. But keeping them in the 
> same file does make it easier for Rmarkdown to eg generate the correct 
> usage section and use the correct Rd makeup etc. At least that's my 
> understanding of it. Hadley will hopefully correct me if I'm wrong.? I 
> haven't checked all the options and possibilities yet in the latest 
> iterations of the package.

I don't see that in the Roxygen2 docs, so hopefully it is possible, and 
someone will point out how it's done.

Duncan Murdoch



[Rd] Best practices in developing package: From a single file
Duncan Murdoch