Hi all, I'm very new to R. I have installed R 1.9.0 on Linux (Fedora). Now I got an self-made package comprising R functions as well as C-Code which are used in several R functions. I installed the package without any error (see install log below). Then, I checked in /usr/lib/R/library if the package izbi exists and it exists. But whenever I try to load the library on the command line I got the following error. > library(izbi) Error in .find.package(package, lib.loc, verbose = verbose) : Object "izbi" not found Error in library(izbi) : .First.lib failed Unfortunately, the whole package is written and tested under R 1.8.0 on Linux (RedHat 9.0) and there are no problems loading and working with the library. To have a more cross check I installed the same package on my laptop using SUSE Linux with R 1.8.0. Ther are also no problems with loading and working with the package. Does anybody knows what I can do? Many thanks, Toralf PS: If you need more info please let me know. ---- install log --------- /u/geware/programs/analysis/R-packages (root) ->R CMD INSTALL izbi * Installing *source* package 'izbi' ... ** libs gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c aggreg.c -o aggreg.o gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c grptest.c -o grptest.o gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c mathutils.c -o mathutils.o gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c uvartest.c -o uvartest.o gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c wyclust.c -o wyclust.o gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c wygrps.c -o wygrps.o gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c wyr.c -o wyr.o gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c wyutils.c -o wyutils.o gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c wyuvar.c -o wyuvar.o gcc -shared -L/usr/local/lib -o izbi.so aggreg.o grptest.o mathutils.o uvartest.o wyclust.o wygrps.o wyr.o wyutils.o wyuvar.o ** R ** data ** help >>> Building/Updating help pages for package 'izbi' Formats: text html latex example COLS text html latex ROWS text html latex bin text html latex example cor.total text html latex example data.mat text html latex example fac text html latex example ubeta text html latex example umbeta text html latex example wy.clust text html latex example wy.grps text html latex example wy.uvar text html latex example * DONE (izbi)
Toralf Kirsten wrote:> Hi all, > I'm very new to R. > I have installed R 1.9.0 on Linux (Fedora). > > Now I got an self-made package comprising R functions as well as C-Code > which are used in several R functions. > > I installed the package without any error (see install log below). > Then, I checked in /usr/lib/R/library if the package izbi exists and it > exists. > > But whenever I try to load the library on the command line I got the > following error. > > library(izbi) > Error in .find.package(package, lib.loc, verbose = verbose) : > Object "izbi" not found > Error in library(izbi) : .First.lib failedHmm. What is your actual library.dynam() call in .First.lib()? Do you have read access to all the files in /usr/lib/R/library/izbi (in particular to ..../izbi/lib/izbi.so - and does it exist)? Running R CMD check might give additional hints ... Uwe Ligges> > Unfortunately, the whole package is written and tested under R 1.8.0 on > Linux (RedHat 9.0) and there are no problems loading and working with > the library. To have a more cross check I installed the same package on > my laptop using SUSE Linux with R 1.8.0. Ther are also no problems with > loading and working with the package. > > > Does anybody knows what I can do? > Many thanks, Toralf > > PS: If you need more info please let me know. > > > > ---- install log --------- > /u/geware/programs/analysis/R-packages (root) ->R CMD INSTALL izbi > * Installing *source* package 'izbi' ... > ** libs > gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES > -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c aggreg.c -o > aggreg.o > gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES > -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c grptest.c -o > grptest.o > gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES > -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c mathutils.c -o > mathutils.o > gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES > -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c uvartest.c -o > uvartest.o > gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES > -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c wyclust.c -o > wyclust.o > gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES > -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c wygrps.c -o > wygrps.o > gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES > -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c wyr.c -o wyr.o > gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES > -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c wyutils.c -o > wyutils.o > gcc -I/usr/lib/R/include -I/usr/local/include -D__NO_MATH_INLINES > -mieee-fp -fPIC -O2 -g -pipe -march=i386 -mcpu=i686 -c wyuvar.c -o > wyuvar.o > gcc -shared -L/usr/local/lib -o izbi.so aggreg.o grptest.o mathutils.o > uvartest.o wyclust.o wygrps.o wyr.o wyutils.o wyuvar.o > ** R > ** data > ** help > >>> Building/Updating help pages for package 'izbi' > Formats: text html latex example > COLS text html latex > ROWS text html latex > bin text html latex example > cor.total text html latex example > data.mat text html latex example > fac text html latex example > ubeta text html latex example > umbeta text html latex example > wy.clust text html latex example > wy.grps text html latex example > wy.uvar text html latex example > * DONE (izbi) > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
> From: Toralf Kirsten > > Hi Uwe, > thanks for your fast response. > > The content of the file izbi/R/First.lib.R of the source > package is as > follows: > ************* > .First.lib <- function(libname, pkgname) { > library.dynam("izbi", package = pkgname, lib.loc = libname) > data(COLS, package=izbi) > data(ROWS, package=izbi) > } > ************* > > The check command also fails (see below). > Any hints?Starting in R-1.9.0, I believe, you need to quote the package name in data(). Andy> Toralf
On Thu, 10 Jun 2004, Liaw, Andy wrote:> > From: Toralf Kirsten > > > > Hi Uwe, > > thanks for your fast response. > > > > The content of the file izbi/R/First.lib.R of the source > > package is as > > follows: > > ************* > > .First.lib <- function(libname, pkgname) { > > library.dynam("izbi", package = pkgname, lib.loc = libname) > > data(COLS, package=izbi) > > data(ROWS, package=izbi) > > } > > ************* > > > > The check command also fails (see below). > > Any hints? > > Starting in R-1.9.0, I believe, you need to quote the package name in > data().Yes if it a string and not a variable, and since the package might get renamed, I think you really want .First.lib <- function(libname, pkgname) { library.dynam("izbi", package = pkgname, lib.loc = libname) data(COLS, package=pkgname) data(ROWS, package=pkgname) } -- Brian D. Ripley, ripley@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 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595