Dear Sir/Madam, I am trying to write a R package and I found what has been said in the "Writing R Extensions" is mostly different from what has been done in the existing packages. For example, in MASS package, there is no *.Rd files nor *.rd files. There is an R-ex directory, which has all the .R files, which should be in the R directory according to the manual. Supprisingly, in the R directory, there is a text file without file extension of .R, which has all the R functions. Could you help me to solve this puzzle? I am lost. Thanks. Yi-Xiong -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
What you looked was the "installed" package. It will look different to the "Source". If you go to any CRAN site, then go to Package Source, get any of the packages then look at it, it will follow the "Writing R Extensions". Cheers, Ko-Kang Wang ------------------------------------------------ Ko-Kang Kevin Wang Post Graduate PGDipSci Student Department of Statistics University of Auckland New Zealand www.stat.auckand.ac.nz/~kwan022 ----- Original Message ----- From: "Yi-Xiong Zhou" <yzhou at arcturusag.com> To: "'R-help at lists.R-project.org'" <R-help at stat.math.ethz.ch> Sent: Friday, June 28, 2002 12:27 PM Subject: [R] writing a R package> Dear Sir/Madam, > > I am trying to write a R package and I found what has been said in the > "Writing R Extensions" is mostly different from what has been done in the > existing packages. For example, in MASS package, there is no *.Rd filesnor> *.rd files. There is an R-ex directory, which has all the .R files, which > should be in the R directory according to the manual. Supprisingly, in theR> directory, there is a text file without file extension of .R, which hasall> the R functions. > > Could you help me to solve this puzzle? I am lost. > > Thanks. > > Yi-Xiong > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-> r-help mailing list -- Readhttp://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html> Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch >_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 27 Jun 2002, Yi-Xiong Zhou wrote:> Dear Sir/Madam, > > I am trying to write a R package and I found what has been said in the > "Writing R Extensions" is mostly different from what has been done in the > existing packages. For example, in MASS package, there is no *.Rd files nor > *.rd files. There is an R-ex directory, which has all the .R files, which > should be in the R directory according to the manual. Supprisingly, in the R > directory, there is a text file without file extension of .R, which has all > the R functions. > > Could you help me to solve this puzzle? I am lost.You appear to be looking at the *binary* package. The documentation describes the format for the *source* code of a package. On operating systems where compiling is difficult, people have provided compiled binary packages which have a very different format. This format isn't documented in "Writing R Extensions" because binary packages are produced by the R INSTALL script, so you don't need to know the format to write R extensions. If you go to CRAN you can download the source package for MASS and see that it does indeed follow the documentation. -thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._