[R] *.R files for user libraries

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jun 22 14:36:09 CEST 2001


On Fri, 22 Jun 2001, Agustin Lobo wrote:

>
> Hi!
>
> The Writing R Extensions document (R-exts.pdf) states that,
> for creating an R library,
>
> ""
> The `R' subdirectory contains R code files. The code files to be installed
> must start with
> a (lower or upper case) letter and have one of the extensions `.R', `.S',
> `.q', `.r', or `.s'.
> ""
>
> Does this mean that each function sould go into
> a separate *.R file?
>
> I understand that I can save a given function as
>
> save(test,file="R/test.R")
>
> But I have many functions, should I make that each function
> go to a separate file? Is there any utility for doing
> this?

You can use one of more files as you like.  You can also just concatentate
the small files into one large file via `cat'.

Most packages use one file for each group of functions, as indeed do the R
sources.

>
> Thanks
>
> Agus
>
> Dr. Agustin Lobo
> Instituto de Ciencias de la Tierra (CSIC)
> Lluis Sole Sabaris s/n
> 08028 Barcelona SPAIN
> tel 34 93409 5410
> fax 34 93411 0012
> alobo at ija.csic.es
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list