[Rd] abs, dots and an S4 method.

2014-08-04 Thread Sven E. Templer
Hello, using the primitive abs(x) does not allow more than just the 'x' argument in an S4 method, e.g. abs(x, arg2), since there is no '...' as in trunc(x, ...). To add a ... argument to abs(x), is it sufficient to change the arity in src/main/names.c for abs as in trunc to a value of '-1'? So it

[Rd] Preferred way to include internal data in package?

2014-08-04 Thread Keirstead, James E
Hi, I’m developing a package and would like to include some data sets for internal use only, e.g. configuration parameters for functions. What is the preferred way of doing this? If I put them in data/, then R CMD check asks me to document them but I’d prefer it if they floated beneath the su

Re: [Rd] Preferred way to include internal data in package?

2014-08-04 Thread Jeroen Ooms
> I’m developing a package and would like to include some data sets for > internal use only, e.g. configuration parameters for functions. What is the > preferred way of doing this? If I put them in data/, then R CMD check asks > me to document them but I’d prefer it if they floated beneath the

Re: [Rd] Preferred way to include internal data in package?

2014-08-04 Thread Keirstead, James E
I saw that, but actually I was wondering if there was a more general method. I’d like to use plain text files if I can, instead of Rda files, since they’re easier to maintain (and it’s a small file). On 4 Aug 2014, at 16:30, Jeroen Ooms wrote: >> I’m developing a package and would like to inc

Re: [Rd] Preferred way to include internal data in package?

2014-08-04 Thread Gábor Csárdi
If you want to keep it as text, then you can just put it in the code: mydata <- '"","mpg","cyl","disp","hp","drat","wt","qsec","vs","am","gear","carb" "Mazda RX4",21,6,160,110,3.9,2.62,16.46,0,1,4,4 "Mazda RX4 Wag",21,6,160,110,3.9,2.875,17.02,0,1,4,4 "Datsun 710",22.8,4,108,93,3.85,2.32,18.61,1,1

Re: [Rd] Preferred way to include internal data in package?

2014-08-04 Thread Carl Boettiger
I would think that putting them in an appropriate subdirectory in inst might be preferable, e.g. inst/examples, and then reading the data in with ?system.file where necessary? (I have frequently been instructed that data ought not be mixed with code, as it makes both code and data harder to read,

Re: [Rd] Preferred way to include internal data in package?

2014-08-04 Thread Jeroen Ooms
On Mon, Aug 4, 2014 at 6:11 PM, Keirstead, James E wrote: > I saw that, but actually I was wondering if there was a more general method. > I’d like to use plain text files if I can, instead of Rda files, since > they’re easier to maintain (and it’s a small file). Well then can just deparse() y

Re: [Rd] Preferred way to include internal data in package?

2014-08-04 Thread Charles Berry
Keirstead, James E imperial.ac.uk> writes: > > Hi, > > I’m developing a package and would like to include some data sets for > internal use only, e.g. > configuration parameters for functions. What is the preferred way of > doing this? If I put them in data/, > then R CMD check asks me to d