You guys are great! I understand the nuances between platforms much better now (the Mac environment does a lot for you in the background, which I had not given much thought to). Success came with unpacking the .zip file into the library folder. Then I still had to install all the dependencies before my package would "activate", but I'm in business now. Thanks a bunch to each of you! Bryan
On 11/30/09 2:46 PM, "Simon Urbanek" <simon.urba...@r-project.org> wrote: > Bryan, > > there are several issues, but let's start with the most hopeful one: > >> 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' > 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' > > As Brian pointed out you can now install source packages on Windows -- > the only reason it fails is that you are missing dependent packages - > "chemometrics" in this case. So install all dependencies first and you > don't have to worry about binary packages - just use the source and > all will be well. > > Then all the other issues are that you're trying to install the binary > package the wrong way. In fact the easiest way to install is to simply > unpack in the "library" directory. The problems you encountered come > from the name mismatches - the name of the file does really matter and > your "SU" / "UL" postfix that you added manually is breaking it. > Please use the original names! > > Cheers, > Simon > > > On Nov 30, 2009, at 14:30 , 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' >>> 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' >> 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" <rip...@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 >>>>> han...@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@stat.math.ethz.ch >>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac >>>>> >>>> >>>> _______________________________________________ >>>> R-SIG-Mac mailing list >>>> R-SIG-Mac@stat.math.ethz.ch >>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac >>>> >> >> _______________________________________________ >> R-SIG-Mac mailing list >> R-SIG-Mac@stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/r-sig-mac >> >> > _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac