[R] trouble loading example package

Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com
Thu Nov 16 12:55:35 CET 2006

Yes, I am using WindowsXP on a 3 year old DELL machine with 2 gig.  I
apologize to Professor Ripley and our other helpers for my omission.

I also tried R CMD build --binary mypkg, as was suggested by Benilton
Carvalho, and with a similar error message.  I don't think I want binaries
in any event.

Still struggling.

Charles Annis, P.E.

Charles.Annis at StatisticalEngineering.com
phone: 561-352-9699
eFax:  614-455-3265
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Prof Brian Ripley
Sent: Thursday, November 16, 2006 4:44 AM
To: Charles Annis, P.E.
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] trouble loading example package

This appears to be about Windows, unstated!

On Thu, 16 Nov 2006, Charles Annis, P.E. wrote:

> Greetings:
> I've installed Rtools, MikTeX, perl, minGW, and HTML Help Workshop, and
> succeeded in making, checking (using R CMD check mypkg) then building the
> simple example package.skeleton(list=c("f","g","d","e"), name="mypkg")  R
> CMD build mypkg produces a tarball.  I don't know how to get a zip file.
> But when I try to Install package(s) from local zip files, I get this
> message:
> Error in gzfile(file, "r") : unable to open connection
> In addition: Warning messages:
> 1: error -1 in extracting from zip file
> 2: cannot open compressed file 'mypkg/DESCRIPTION'
> But when I click on that file in the tarball it opens and shows me what I
> expected.

But you don't have a zip file, which is what warning 1 has told you.

> I had hoped that I had weathered the hard part - building the package -

You haven't: the interesting part is INSTALLing the package.

> I still need some help:
> 1) How do I get a zipped file, rather than a tarball,

R CMD INSTALL --build (preferably)
R CMD build --binary

> 2) How do I install what I've built?

R CMD INSTALL foo_1.0.0.tar.gz

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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list