From h.wickham at gmail.com  Wed Jan 31 05:44:31 2018
From: h.wickham at gmail.com (Hadley Wickham)
Date: Tue, 30 Jan 2018 20:44:31 -0800
Subject: [Rd] Best practices in developing package: From a single file
In-Reply-To: <ac51f4f1-c71e-9555-9668-10e2c880c04a@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>
 <ac51f4f1-c71e-9555-9668-10e2c880c04a@gmail.com>
Message-ID: <CABdHhvHaZCDnetJL+QW+-1moka-wy4+DtihM2M9nD8u_Yay6Og@mail.gmail.com>

>> There is package.skeleton() in base R as you already mentioned. It drove
>> me
>> bonkers that it creates packages which then fail R CMD check, so I wrote a
>> wrapper package (pkgKitten) with another helper function (kitten()) which
>> calls the base R helper and then cleans up it---but otherwise remains
>> faithful to it.
>
>
> Failing R CMD check isn't a big deal:  you want to be reminded to edit those
> incomplete help files.  But I think I recall that you couldn't even build
> the package that package.skeleton() created, and that indeed would be
> irritating, especially if you had a lot of functions so you had a lot of
> cleanup to do.  I don't know if that's still true because I generally use
> RStudio to create the initial package structure rather than calling
> package.skeleton myself.

Personally, I think the biggest problem with package.skeleton() is
that it assumes that the source of truth is objects in an environment.
This seems the wrong way around to me.

Hadley

-- 
http://hadley.nz



[Rd] Best practices in developing package: From a single file
Hadley Wickham