From sleepingwell at gmail.com  Sat Jul 20 13:01:25 2013
From: sleepingwell at gmail.com (Simon Knapp)
Date: Sat, 20 Jul 2013 21:01:25 +1000
Subject: [Rd] Problem with distributing data in package.
In-Reply-To: <CANVKczMVQjiY2LL2CsJvbYX4=jjDCXC9V-L28hqtyD9YKvy_PQ@mail.gmail.com>
References: <40021026bf894a17a9db5f6c883ba0f6@EX-1-HT0.lancs.local>
	<CANVKczMVQjiY2LL2CsJvbYX4=jjDCXC9V-L28hqtyD9YKvy_PQ@mail.gmail.com>
Message-ID: <CAA+5f=2aJ-LEVXrRiwr9B+wV5bRR90bjnfp8k6a7uxzPOJiXqA@mail.gmail.com>

Hi Barry,

Thanks for the response, your suggestion was going to be my 'work
around'... perhaps I took the second paragraph of section 1.1.5 of
R-exts.pdf the wrong way.

I'd be interested in knowing why there is a difference between the
data in a source package (.rda files) and windows binary package (.R
files) if anyone can tell me.

Thanks again,
Simon

On Sat, Jul 20, 2013 at 4:58 PM, Barry Rowlingson
<b.rowlingson at lancaster.ac.uk> wrote:
> On Fri, Jul 19, 2013 at 10:33 AM, Simon Knapp <sleepingwell at gmail.com> wrote:
>> Hi List,
>>
>> I am building a package for a client to help them create and perform
>> analyses against netcdf files which contain 'a temporal stack' of
>> grids.
>>
>> For my examples and test cases, I create an example dataset in code
>> (as this is a lot more space efficient than providing raw data). The
>> code creates a netcdf file in tempdir() and an object of class 'ncdf'
>> in the global namespace. I have placed the code in a .R file in the
>> data directory of my package and 'load' it with a call to data().
>
>  Why not just put the function that generates the data file into the
> usual place (/R/ folder) and document it so that the user knows to run
> 'sampledata=makeSampleNCDF()' before doing things that need it?
>
>  Trying to put executable code into the data folder does seem a bit perverse!
>
> Barry



[Rd] Problem with distributing data in package.
Simon Knapp