Building and installing packages with functions with names starting with (PR#2229)

Kurt Hornik Kurt.Hornik@wu-wien.ac.at
Wed, 30 Oct 2002 17:31:22 +0100


>>>>> JensHenrik Badsberg writes:

>  Dear Coreteam,

>  I am getting closer to have some R-packages with interface to CoCo.
>  I use something like package.skeleton("CoCo", list = ls(all.names
>  = TRUE)) to also get my functions beginning with "." into the package.
>  Functions with names starting with "." are put OK into the package
>  during "R CMD build ...",  but when R at "R INSTALL - d ..." collects
>  the R-files into the single file for putting into .../R the functions
>  with names starting with "." are omitted ?!?

R CMD INSTALL behaves according to what is documented in R-exts:

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

So I believe the code in package.skeleton() which has

    cat("Saving functions and data\n")
    for (item in list) {
        if (is.function(get(item))) 
            dump(item, file = file.path(path, name, "R", paste(item, 
                "R", sep = ".")))
        else save(list = item, file = file.path(path, name, "data", 
            paste(item, "rda", sep = ".")))
    }

Also, I personally do not believe that non-functions in the environment
that is dumped out should by default be made into data sets.

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._