Re: [Rd] data() statement in functions

2006-08-02 Thread Prof Brian Ripley
On Wed, 2 Aug 2006, Robin Hankin wrote: > Hi > > I am writing a package in which a function needs a dataset (of > precomputed Stirling > numbers) to work. The .rda file resides in the data/ directory. > > Toy example follows: > > > f <- function(x){ >data(logS1) >. . . do stuff . .

[Rd] data() statement in functions

2006-08-02 Thread Robin Hankin
Hi I am writing a package in which a function needs a dataset (of precomputed Stirling numbers) to work. The .rda file resides in the data/ directory. Toy example follows: f <- function(x){ data(logS1) . . . do stuff . . . return(answer) } Is this a good way to do this? What is b