[R] creating a distinct zip file

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Sat Feb 21 08:31:43 CET 2015


On Windows it builds a zip file. If you are on Linux, you might [1] need [2].

[1] https://stat.ethz.ch/pipermail/r-help/2005-January/063596.html
[2] http://cran.r-project.org/doc/contributed/cross-build.pdf
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

On February 20, 2015 6:56:34 PM PST, Rolf Turner <r.turner at auckland.ac.nz> wrote:
>On 21/02/15 15:02, Jeff Newmiller wrote:
>> R CMD INSTALL --build packagename
>
>That will create a *.tar.gz file, not a *.zip file.  The latter being
>what Erin wanted, if I understand correctly.
>
>I have worked around the problem in the past with a shell script
>like unto:
>
>#! /bin/csh
>set vnum = `grep Version $pkge/DESCRIPTION | sed -e 's/Version: //'`
>R CMD INSTALL -l Lib $pkge >& /dev/null
>cd Lib
>zip -r -l $pkge.zip $pkge >& /dev/null
>mv $pkge.zip ../$pkge"_"$vnum.zip
>
>In the foregoing "pkge" is the name of the package you are trying to 
>build.  You will have to have created the "holding library" "Lib" a
>priori.
>
>There are doubtless (much) better ways of accomplishing this task, but
>I 
>don't know them.
>
>cheers,
>
>Rolf
>
>>
>---------------------------------------------------------------------------
>> Jeff Newmiller                        The     .....       .....  Go
>Live...
>> DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live
>Go...
>>                                        Live:   OO#.. Dead: OO#.. 
>Playing
>> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
>> /Software/Embedded Controllers)               .OO#.       .OO#. 
>rocks...1k
>>
>---------------------------------------------------------------------------
>> Sent from my phone. Please excuse my brevity.
>>
>> On February 20, 2015 1:07:10 PM PST, Erin Hodgess
><erinm.hodgess at gmail.com> wrote:
>>> Hello yet again.
>>>
>>> I am trying to create a zip file for a friend who has a Windows
>>> machine.
>>>
>>> He needs to access this via the "local zip file" packages option.
>>>
>>> When I use R CMD INSTALL --compile-both, it produces an item in the
>>> library
>>> tree (as promised).
>>>
>>> However, I would like to have an actual .zip file.
>>>
>>> I do know at one time that was possible, not sure if I can still do
>it.
>>>
>>> I did try R CMD INSTALL --force-biarch as well, same result as
>compile
>>> both.
>>>
>>> thank you for any suggestions.
>>>
>>> Sincerely,
>>> Erin
>>
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> 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