[R] write a **package** under 2.0.1 version

Martin Maechler maechler at stat.math.ethz.ch
Tue Mar 1 17:28:04 CET 2005

>>>>> "marta" == marta  <marta at statistica.it>
>>>>>     on Tue, 1 Mar 2005 16:23:17 +0100 (CET) writes:

    marta> Hi there,
    marta> I had written a library under R 1.9.0 and now I would like to import that
    marta> library under R 2.0.1

"package", "package", "package" -- a "library" is something
really different!

    marta> Apparently it does not work; I can install the
    marta> package, but when I try to read it the error is the
    marta> following:

    marta> Error in library(compvar) : 'compvar' is not a valid package -- installed
    marta> < 2.0.0

so you haven't really "installed" in the sense of "Rcmd INSTALL <pkgname>"
[ You didn't tell us, but you probably are using Micro$oft Windows?
  On other platforms its "R CMD INSTALL <pkgname>"   ]

and you (or whoever provided the ``pre-compiled'' package to you)
must run "Rcmd INSTALL" on that package where 'Rcmd' is any R
version 2.x.y (2.0.1, typically).

However, this won't work easily for you if you are on Windows,
since you need to first install quite a few tools before you can
build and install packages ```from source''
--> read the 'rw-faq' i.e. "R for windows Frequently Asked
Questions (and answers)" that is accessible from the [Help] menu
on Windows.

    marta> I have checked other libraries in R 2.0.1 and I
other >> packages <<

    marta> noticed that there is a new folders (Meta) that were
    marta> not present under R 1.9.1 as well as a file
    marta> (MD5). Moreover, under R folders there are files with
    marta> .rdx and .rdb extensions that were not present
    marta> before.

these are rather in connection with Lazyloading and other
features that more packages are using, but you shouldn't have to
know about.

    marta> I was wondering how I can built these files for the library to be
    marta> importable under 2.0.1 version.

    marta> Any suggestion?

"Rcmd INSTALL" (but see above)

Martin Maechler, ETH Zurich

More information about the R-help mailing list