[R-SIG-Mac] Built on Mac, Installing on Windows - should this work?

Duncan Murdoch murdoch at stats.uwo.ca
Mon Nov 30 20:43:50 CET 2009


On 30/11/2009 2:30 PM, Bryan Hanson wrote:
> Hello Folks, thanks for the suggestions.  I did what Simon suggested.  And I
> did what Ducan suggested, namely to use Uwe's building service.  I think
> both of these produced the same set of files (though I don't know how to
> check rigorously).  So I moved these two archives, along with my source
> archive, over to the Windows machine.  I tried installing all of them via
> the GUI dialog boxes, and when that didn't work, I tried doing it from the
> command line. 
>
> I'm pretty certain I'm now no longer in the Mac realm :-( and I'm pretty
> certain I'm missing something obvious.  It looks like it can't find the
> file, but the paths and names look right to me.  If one unstuffs these
> manually they look like they have the files.  Any suggestions would be
> appreciated.   The transcript from what I did is immediately below.
>
> Thanks, Bryan
> *************
> Bryan Hanson
> Acting Chair
> Professor of Chemistry & Biochemistry
> DePauw University, Greencastle IN USA
>
> > getwd()
> [1] "C:/Documents and Settings/Chemistry 1/Desktop"
> > list.files()
> [1] "ChemoSpec_1.31-SU.zip" "ChemoSpec_1.31-UL.zip" "ChemoSpec_1.31.tar.gz"
> "outcome.txt"   
>
> # the next few steps are attempts at manual installations:
> > install.packages(pkgs = "ChemoSpec_1.31-SU.zip", repos = NULL)
> Error in gzfile(file, "r") : cannot open the connection
> In addition: Warning message:
> In gzfile(file, "r") :
>   cannot open compressed file 'ChemoSpec_1.31-SU/DESCRIPTION', probable
> reason 'No such file or directory'
>   

Looks like your DESCRIPTION file was missing in this try.
> > install.packages(pkgs = "ChemoSpec_1.31.tar.gz", repos = NULL, type =
> "source")
> * installing *source* package 'ChemoSpec' ...
> ** R
> ** data
> ** inst
> ** preparing package for lazy loading
> Warning in library(pkg, character.only = TRUE, logical.return = TRUE,
> lib.loc = lib.loc) :
>   there is no package called 'chemometrics'
>   

Looks as through ChemoSpec depends on chemometrics, and you need to 
install that first.  By default Windows will install dependencies when 
it's getting something from CRAN, but not when you're installing a local 
package with repos=NULL.

So you need to install chemometrics first, then this way should work.  
The first one appears to be failing because the .zip file is badly formed.

Duncan Murdoch
> Error : package 'chemometrics' could not be loaded
> ERROR: lazy loading failed for package 'ChemoSpec'
> * removing 'C:/PROGRA~1/R/R-210~1.0/library/ChemoSpec'
> * restoring previous 'C:/PROGRA~1/R/R-210~1.0/library/ChemoSpec'
> Warning message:
> In install.packages(pkgs = "ChemoSpec_1.31.tar.gz", repos = NULL,  :
>   installation of package 'ChemoSpec_1.31.tar.gz' had non-zero exit status
>
> # the next few are the attempts with the GUI dialog boxes
> > utils:::menuInstallLocal()
> Error in gzfile(file, "r") : cannot open the connection
> In addition: Warning message:
> In gzfile(file, "r") :
>   cannot open compressed file 'ChemoSpec_1.31-SU/DESCRIPTION', probable
> reason 'No such file or directory'
> > utils:::menuInstallLocal()
> Error in gzfile(file, "r") : cannot open the connection
> In addition: Warning message:
> In gzfile(file, "r") :
>   cannot open compressed file 'ChemoSpec_1.31-UL/DESCRIPTION', probable
> reason 'No such file or directory'
> > utils:::menuInstallLocal()
> Error in gzfile(file, "r") : cannot open the connection
> In addition: Warning messages:
> 1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
> 2: In gzfile(file, "r") :
>   cannot open compressed file 'ChemoSpec_1.31.tar.gz/DESCRIPTION', probable
> reason 'No such file or directory'
> > sessionInfo()
> R version 2.10.0 (2009-10-26)
> i386-pc-mingw32 
>
> locale:
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
> States.1252   
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> loaded via a namespace (and not attached):
> [1] tools_2.10.0
> > 
>
>
>
>
> On 11/30/09 11:48 AM, "Prof Brian Ripley" <ripley at stats.ox.ac.uk> wrote:
>
> > On Mon, 30 Nov 2009, Duncan Murdoch wrote:
> > 
> >> On 30/11/2009 11:10 AM, Bryan Hanson wrote:
> >>> Hi R Mac Folks... A question about using Mac-built pkgs on the dreaded
> >>> Windows machines.
> >>> 
> >>> I have successfully checked, built and installed a package on my Mac.  The
> >>> package tarball is at github.com/bryanhanson/ChemoSpec if you care to try
> >>> installing it.  It was checked and built with defaults, so I did
> >>> 
> >>>> R CMD check ChemoSpec
> >>>> R CMD build ChemoSpec
> >>> 
> >>> And everything was fine.  I can install it and run it on my Mac no problem.
> >>> I believe it is a ³source² package ­ there is no compiled code, it¹s all
> >>> straightfoward R.
> >>> 
> >>> Now, I want to test the installation on Windows (because students have to
> >>> use it next semester).  I¹m having a variety of problems getting it
> >>> upzipped
> >>> and installed.  Before I spend a lot of time trouble shooting the Windows
> >>> aspect, and here¹s my question, should this package as I built it and so
> >>> forth work on  Windows without modification?  Or do I have to do the
> >>> check/build with different options?  Or do I have to do the entire process
> >>> on a Windows machine (pray not!).  I¹ve looked around in the manuals and
> >>> help pages a bit, there doesn¹t seem to be any hint that a different
> >>> process
> >>> is needed.
> >>> 
> >> 
> >> The source tarball (the .tar.gz file) would be fine on Windows, but most
> >> Windows users don't have the tools to install it.  Since you don't have any
> >> compiled code it's probably not hard to put together a zip file equivalent to
> >> what R CMD INSTALL --binary would produce on Windows, but it's probably
> >> easier to use Uwe Ligge's package building service, available at
> >> http://129.217.207.166.
> > 
> > I agree with the conclusion (not least as it checks the package works
> > on Windows), but in current R (2.10.0) you actually don't need any
> > extra tools to install such a source package on Windows.
> > 
> > It's all in the manuals ....
> > 
> > 
> >> Duncan Murdoch
> >>> By the way, I can manually get the entire package intact as text files to
> >>> the proper Windows directory, but R claims it is not a valid installed
> >>> package.  Any of the RGui Windows means of installing the package give
> >>> various problems.  I¹ll keep trouble shooting these but I wanted to double
> >>> check that what I am trying to do should work.
> >>> 
> >>> Thanks, Bryan
> >>> **************
> >>> Bryan Hanson
> >>> Acting Chair
> >>> Professor of Chemistry & Biochemistry
> >>> DePauw University
> >>> 602 S. College Avenue
> >>> Greencastle, IN 46135
> >>> PHONE     765-658-4602
> >>> FAX     765-658-6084
> >>> hanson at depauw.edu
> >>> http://academic.depauw.edu/~hanson/deadpezsociety.html
> >>> http://www.depauw.edu/acad/chemistry/
> >>> http://academic.depauw.edu/~hanson/UMP/index.html
> >>> 
> >>> 
> >>> 
> >>> [[alternative HTML version deleted]]
> >>> 
> >>>   ------------------------------------------------------------------------
> >>> 
> >>> _______________________________________________
> >>> R-SIG-Mac mailing list
> >>> R-SIG-Mac at stat.math.ethz.ch
> >>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >>> 
> >> 
> >> _______________________________________________
> >> R-SIG-Mac mailing list
> >> R-SIG-Mac at stat.math.ethz.ch
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >> 
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>



More information about the R-SIG-Mac mailing list