Re: [R] Package struction question (second try)

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Tue 27 Jun 2006 - 03:22:55 EST

Kuhn, Max wrote:

> Jay,
>
> You should use "RCMD install --build pkgName" to create the zip file on
> Windows. The zip files you see on CRAN are Windows binaries. You could
> also used "RCMD build pkgName", but I remember seeing a post a while
> back saying that using install instead of build was best (anyone - is
> that true?).

Yes,

   R CMD INSTALL --build

is preferable to

   R CMD build --binary

but

   R CMD build

(without "--binary") builds a source package rather than a binary package.

Uwe Ligges

>
> See you next week in Groton,
>
> Max
>
> <snip>
>
> Sorry, gmail seemed to have made an attachment out of my first attempted
>
> post. Trying again:
>
> ------------------------------
>
> At the encouragement of many at UseR, I'm trying to build my first real
> package. I have no C/Fortran code, just plain old R code, so it should
> be
> rocket science. On a Linux box, I used package.skeleton() to create a
> basic package containing just one "hello world" type of function. I
> edited the DESCRIPTION file, changin the package name appropriately. I
> edited the hello.Rd file. Upon running R CMD check hello, the only
> warning had to do with the fact that src/ was empty (obviously I had no
> source in such a simple package). I doubt this is a problem.
>
> I was able to install and use the package successfully on the Linux
> system
> from the .tar.gz file, so far so good! Next, on to Windows, where the
> problem arose:
>
> I created a zip file from inside the package directory:
>
> zip -r ../hello.zip ./*
>
> When I moved this to my Windows machine and tried to install the package
>
> using the GUI, I received the following error:
>
>
>>utils:::menuInstallLocal()
>
> Error in unpackPkg(pkgs[i], pkgnames[i], lib, installWithVers) :
> malformed bundle DESCRIPTION file, no Contains field
>
> I only found one mention of this in my Google search, with no reply to
> the
> thread. The Contains field appears to be used for bundles, but I'm
> trying
> to create a package, not a bundle. This leads me to believe that a
> simple
> zipping of the package directory structure is not the correct format for
> Windows.
>
> Needless to say, there appears to be wide agreement that making packages
> requires precision, but fundamentally a package should (as described in
> the
> documentation) just be a collection of files and folders organized a
> certain
> way. If someone could point me to documentation I may have missed that
> explains this, I would be grateful.
>
> Regards,
>
> Jay
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jun 27 03:29:15 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 27 Jun 2006 - 04:12:32 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.