ellisp / forecastHybrid

Convenient functions for ensemble forecasts in R combining approaches from the {forecast} package
GNU General Public License v3.0
79 stars 23 forks source link

hi! I have problems with install.packages #60

Closed savvaskef closed 7 years ago

savvaskef commented 7 years ago

I am trying to use forecastHybrid from .net. I have to include the task of initializing the R session by evaluating library commands. In case (the first time) there is no access to the libraries I need to evaluate Install.packages plus i'd preffer to keep the version steady and so decide myself when the solution will be updated.I do this with the standard command: install.packages(path2zoo.tar.gz,repos=null,type="source")

While this works for some packages, at others (namely zoo and forecast packages) it produces the following error:

Installing package into ‘C:/Users/savvas/Documents/R/win-library/3.3’ (as ‘lib’ is unspecified) * installing source package 'zoo' ... package 'zoo' successfully unpacked and MD5 sums checked libs

** arch - i386 Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-33~1.0/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-33~1.0/share/make/winshlib.mk" SHLIB="zoo.dll" OBJECTS="coredata.o init.o lag.o"' had status 127 ERROR: compilation failed for package 'zoo' removing 'C:/Users/savvas/Documents/R/win-library/3.3/zoo' Warning in install.packages : running command '"C:/PROGRA~1/R/R-33~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\savvas\Documents\R\win-library\3.3" "C:/Users/savvas/DOCUME~1/VISUAL~1/Projects/SC92B9~1/RPACKA~1/zoo_1.7-14.tar.gz"' had status 1 Warning in install.packages : installation of package ‘C:/Users/savvas/DOCUME~1/VISUAL~1/Projects/SC92B9~1/RPACKA~1/zoo_1.7-14.tar.gz’ had non-zero exit status

there appears the same problem if i install from command line r.exe cmd install "path2zoo.tar.gz" filenames are versions forecast_7.3.tar.gz and zoo_1.7-14.tar.gz . I collected them with download command

any ideas of how to work around this?

ellisp commented 7 years ago

What happens when you try:

install.packages("forecastHybrid")

?

savvaskef commented 7 years ago

for any online installation a mirror selection list appears and when a selection is made the package downloads and gets installed.allswell... the problem begins when i try to install.package from an offline sourcr...you see i want to fix the version so that i'll be the one to decide when to update

savvaskef commented 7 years ago

the problem occurs only in zoo and forecast packages

ellisp commented 7 years ago

I think you'll need to take it up with the zoo and forecast maintainers.

However, overall, I don't think manual downloads is a good solution to controlling your package versions. I think you should think in terms of a data-stamped whole library of all packages, rather than try to control individual package versions. The problem being that if you update a single package in your library it has unexpected consequences for its dependencies. So best is to get a stable library of all of your packages; then when you want an upgrade, create a new folder, date stamp it, tell .libPaths() this is the new library, and do the updates you want in that library. This is how we manage it at my work. It means that you have a bunch of stable date-stamped library folders of all your packages from a single point in time. And when you do the updating, you update the whole library at once and you can do it the way its designed ie with install.packages() or `devtools::install_github()..

A more formal and even better solution that I haven't worked with but which is designed for this problem is the packrat package.

savvaskef commented 7 years ago

that sounds like a solution! how do I download(from web to folder) a whole library?and how to change lib_paths?If you know of any link or just the appropriate commands please provide

savvaskef commented 7 years ago

I will consider your solution but there is some progress in the direction of my initial plan.This time I tried installations with RStudio.More or less the same zoo and forecast don't want to co-operate.The error that appears this time is : Installing package into ‘C:/Users/savvas/Documents/R/win-library/3.3’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘C:/Users/savvas/Documents/Visual Studio 2010/Projects/SchedFlows V6Projects/r packages/forecast_7.3.zip’ is not available (for R version 3.3.0) I even tried to replace the versions i downloaded to my PC (download.packages) with the tempfiles R keeps when an on-line install.packages takes place

again the problem appears at zoo and forecast packages

savvaskef commented 7 years ago

the problem lies with r version. it must be set to R-3.3.2 . when r-3.3.3 is used zoo,forecast and possibly other packages remain stubbornly uninstallable from an off-line source