Skip to content

write a library under 2.0.1 version

8 messages · marta@statistica.it, Uwe Ligges, Martin Maechler +4 more

#
Hi there,
I had written a library under R 1.9.0 and now I would like to import that
library under R 2.0.1
Apparently it does not work; I can install the package, but when I try to
read it the error is the following:

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

I have checked other libraries in R 2.0.1 and I noticed that there is a
new folders (Meta) that were not present under R 1.9.1 as well as a file
(MD5). Moreover, under R folders there are files with .rdx and .rdb
extensions that were not present before.

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

Any suggestion?

Cheers,
Marta
#
marta at statistica.it wrote:

            
You are talking about a *package*, I guess.
You have to (re-)install it from the sources.
>
Right, lazy loading database.
I guess you are under Windows?
Please read the R FAQ, the R for Windows FAQ, the manual "Writing R 
Extensions" and also ?INSTALL. All of them mention how to install from 
the package's sources.

Uwe Ligges
#
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)

Regards,
Martin Maechler, ETH Zurich
#
On Tue, 1 Mar 2005 16:23:17 +0100 (CET), marta at statistica.it wrote :
You need to use R CMD INSTALL path-to-src-package

to build those files and install the package properly.  Simply copying
it into place doesn't work.  See the Writing R Extensions manual for
more details.

Duncan Murdoch
#
On Tue, 1 Mar 2005 marta at statistica.it wrote:

            
You install the package with R CMD INSTALL, just as was documented for 
1.9.1.  See the `Writing R Extensions' and `R Installation and 
Administration' manuals.
#
Yet again, yet again, Martin.  I told you...


On Tue, 1 Mar 2005 17:28:04 +0100, Martin Maechler
<maechler at stat.math.ethz.ch> wrote:

  
    
#
On Tue, 1 Mar 2005, Prof Brian Ripley wrote:

            
Out of curiousity, just how often has the package installation
compatibility between versions been an issue? Would it perhaps
be beneficial to version personal directories by major version?
I.e. instead of having just "~/R/library", would it be better
to have "~/R/1.x/library" and "~/R/2.x/library" and have the
.Rprofile select appropriately depending on version of R being
executed? If so, maybe this question would cease to be an issue.

I'd be interested to know how Prof. Ripley's R_LIBS variable
is defined, if he wouldn't mind sharing. Also curious if most
people keep BioConductor packages installed separately in a
third location.

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)
#
Paul Roebuck wrote:
Happens from time to time, in particular if compiled code is included.
Why???
Why do you want to execute any R version < 2.0.1?
Now I'm completely lost. if you really want to keep separate libraries 
for R-2.x.y and R-1.x.y, you can simply call R with R_LIBS set, or for 
your convenience write a two line shell script that sets R_LIBS 
appropriately and calls the relevant version of R after that.

Uwe Ligges