From edd at debian.org  Thu Mar 12 17:58:28 2015
From: edd at debian.org (Dirk Eddelbuettel)
Date: Thu, 12 Mar 2015 11:58:28 -0500
Subject: [Rd] Best way to handle dependency on non-CRAN package / large
 data package?
In-Reply-To: <CAEO2kuLw=dvWQz2hWWRPnZiayV=xaZu-eH4beG4AhfmT_-axcQ@mail.gmail.com>
References: <CAEO2kuJzie8_eFi0RYA=V5rUk4DYQa6OeuR21XypUdanJXVSyw@mail.gmail.com>
	<21761.48424.267182.677329@max.nulle.part>
	<CAEO2kuLw=dvWQz2hWWRPnZiayV=xaZu-eH4beG4AhfmT_-axcQ@mail.gmail.com>
Message-ID: <21761.50612.724681.741878@max.nulle.part>


On 12 March 2015 at 09:40, arilamstein at gmail.com wrote:
| Thanks Dirk. I'm looking at it now.?
| 
| At first glance your documentation brings up a good limitation of simply
| telling users to type "devtools::install_github()". Namely, what happens when
| the census bureau updates their shapefiles, and I subsequently decide to update
| the package? Or if I discover an error in the package and decide to update it?
| The choroplethr package could have a dependency, and it's not clear how to make
| that dependency explicit to the user.?

100% agree. 

In writing drat, and talking to R users about it, I surprisingly often find
many (advanced) R users who seem to not use update.packages() at all.

R itself has your problem solved by providing repositries. And drat makes
creating and filling repositories (the author side) vey easy -- and that we
also aid the user side as installation as well as regular updates fall back
onto standard R functions: install.packages(), update.packages().  And this
does not require any additinal or manual steps on the part of the users (once
drat:::add(...)  has been added to their startup files).

So for this example, you could add a versioned Depends: in the
shapefile-using package and update the drat repository with an updated
shapefile package.  Users of drat and update.packages() would get updates
automagically. 

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



[Rd] Best way to handle dependency on non-CRAN package / large data package?
Dirk Eddelbuettel