[R] adding a function after package.skeleton()

Gavin Simpson gavin.simpson at ucl.ac.uk
Thu Jan 3 18:02:09 CET 2008


On Thu, 2008-01-03 at 14:47 +0000, Gavin Simpson wrote:
> On Sun, 2007-12-30 at 20:28 +0000, baptiste Auguié wrote:
> > Hi,

<snip />

> Is Constants supposed to be fixed and unchanging? If yes, why hold these
> in a data object? One option might be to have a function Constants() in
> your package, such that it returns a list e.g.
> 
> Constants <- function() {
>     list(h = h, cel = cel, ee = ee)
> }

Sorry, the above should have been:

Constants <- function() {
    list(h = 3.14, cel = 1, ee = 10)
}

G

<snip />
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%




More information about the R-help mailing list