Re: [R] ozone data

2009-10-17 Thread Liviu Andronic
On 10/17/09, Julius Tesoro jutes...@yahoo.com wrote:
  I am looking at the plyr package and I am intrigued at how data(i.e. ozone, 
 baseball) is loaded without having to type data(ozone). Are they 
 automatically loaded when i call library(plyr)? I want to do the same thing 
 when I make my package. How does one accomplish this?

I don't know how this is achieved, but try looking at the source code
for the package.


  Also, are there any beginner guides on how to make a package?

I would not call this a beginner's guide, but here's the standard
reference [1]. This is what I wrote some time ago in an off-list
message:
When I published my first (and still only) R package I also found it
daunting to get it working. Perhaps the easiest way to get it
going---at least it worked for me---would be to:
- take the source archive of an existing package with a
very-simple-structure (nortest or even Rcmdr) or a package that would
be very similar to what you need [consider the potential licence issues, though]
- get rid of/replace files as needed
- not forget to run R CMD check (to check that the code conforms to
CRAN requirements) and R CMD build (to build the release tarball)
- then what rests to do is drop the latter on the CRAN FTP server.

It's been some time that I did this, so there might be some missing
step. Hope this is of help. Best,
Liviu

[1] http://cran.r-project.org/doc/manuals/R-exts.pdf

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] ozone data

2009-10-17 Thread Liviu Andronic
On 10/17/09, Julius Tesoro jutes...@yahoo.com wrote:
 wow thanks but how do i load data just by typing ozone on the console?

It would probably suffice to include the dataset as an object in your
package, and then `data(ozone)' should bring it up as soon as your
package is loaded. Look at the source code of any package offering
such data set (there are plenty built-in data sets: Angell, iris,
maryo, mtcars, etc., etc.). You can use rseek or package(sos) to
pinpoint the exact files of interest.
Liviu

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.