[R] want to write a package for R

Ott Toomet otoomet at econ.dk
Mon Jun 2 09:46:17 CEST 2003


Hello,

You should start creating a separate directory for your package
(e.g. foo).  As a minimum you need three things:

1) your R functions (as .R files in directory foo/R)

2) documentation of your functions in .Rd format (look "writing R
   extensions" and function prompt(), they must reside in foo/man directory)

3) The DESCRIPTION file (in the foo directory).  Everything else is
   made by R.

Now run "R CMD build foo" in the directory above (where the subdir foo
is lying).

It was pretty easy to do on linux, with windows you probably need
necessary tools as perl.  Otherwise, it should be similar.

Bundles are just collections of different packages, probably not for
you right now.

Perhaps it helps.

Ott

 | Date: Sun, 1 Jun 2003 16:02:13 +0800 (CST)
 | From: "Ìì²Å" <xthua111 at sohu.com>

 |      hello,everyone!
 |      I have studied in univ. for two years.and my teacher have put out 
 | some stat. model .and i want to write it to a R package, and take 
 | it to my future paper.any advise? i learned something about SAS/stat.
 | and i have read the tutorial of R.
 |      now i can interactive with R,and
 | write R file.but i didn't have a contour of how to write a package.
 | R extension said package is consisted of DESCRIPTION,INDEX,subdirectories
 | ,bundles.should i write all the file?
 |      thank you.




More information about the R-help mailing list