I ´ve tried to install some packages from Rmetrics, but it looks I am doing something wrong.
For
https://r-forge.r-project.org/scm/viewvc.php/pkg/fPortfolioBacktest/?logsort=cvs&root=rmetrics&pathrev=4948
I simply used
install.packages("fPortfolioBacktest", repos="http://R-Forge.R-project.org")
but
> install.packages("fPortfolioBacktest", repos="http://R-Forge.R-project.org")
Warning: unable to access index for repository http://R-Forge.R-project.org/bin/windows/contrib/2.12
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘fPortfolioBacktest’ is not available
Exactly the same problem is with
https://r-forge.r-project.org/scm/viewvc.php/pkg/Rsocp/?root=rmetrics&pathrev=3690
> sessionInfo()
R version 2.12.0 (2010-10-15)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=Slovak_Slovakia.1250 LC_CTYPE=Slovak_Slovakia.1250 LC_MONETARY=Slovak_Slovakia.1250 LC_NUMERIC=C
[5] LC_TIME=Slovak_Slovakia.1250
attached base packages:
[1] splines stats graphics grDevices utils datasets methods base
other attached packages:
[1] corpcor_1.5.7 fPortfolio_2130.80 fAssets_2100.78 fCopulae_2110.78 sn_0.4-16
[6] mnormt_1.4-3 robustbase_0.7-0 xlsx_0.3.0 xlsxjars_0.3.0 rJava_0.8-8
[11] ttrTests_1.5 PerformanceAnalytics_1.0.3.2 fTrading_2110.77 fBasics_2110.80 timeSeries_2130.90
[16] timeDate_2130.91 dynlm_0.3-0 car_2.0-8 survival_2.36-3 nnet_7.3-1
[21] MASS_7.3-8 lmtest_0.9-27 tseries_0.10-24 quadprog_1.5-3 quantmod_0.3-15
[26] TTR_0.20-2 xts_0.8-0 zoo_1.6-4 Defaults_1.1-1
loaded via a namespace (and not attached):
[1] grid_2.12.0 lattice_0.19-13 Rglpk_0.3-5 slam_0.1-22 strucchange_1.4-2 tools_2.12.0
Is there a fast way how to install them with all the dependencies? I am using Windows XP
Thanks,
Alex
Thanks for adding the error and your sessionInfo.
As I said in my comment, you're running an old version of R (2.12.0). R-forge only builds binaries for the most recent major revision (2.13.X). You need to either upgrade R or build from source. To build from source on Windows, you will need the Windows toolset.
Related
I have updated my Fedora Distribution recently, and R was updated too. I re installed most of the packages, but I couuldnt install blotter and quantstrat.
How can I solve this issue? Thank you!
The error I get is the following one:
install.packages("quantstrat", repos="http://R-Forge.R-project.org")
Warning in install.packages :
package ‘quantstrat’ is not available (for R version 3.4.0)
My sessioninfo is the folowing:
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 25 (Twenty Five)
Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
locale:
[1] LC_CTYPE=es_AR.UTF-8 LC_NUMERIC=C LC_TIME=es_AR.UTF-8 LC_COLLATE=es_AR.UTF-8
[5] LC_MONETARY=es_AR.UTF-8 LC_MESSAGES=es_AR.UTF-8 LC_PAPER=es_AR.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=es_AR.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0
Your problem likely isn't an issue related to Fedora linux. Install quantstrat from souce via github, where the latest code resides:
library(devtools) # need devtools to use install_github
install_github("braverock/quantstrat")
Thank you very much!! I have successfully intalled it! Both in my Fedora and in W10 notebook.
I installed a weeks ago. I had to wait for the new TS package to be available on cran, since blotter required it.
Thank you very much!
I'm doing some heavy work with my computer. I'd like R used the 4 processors . But, used one at a time. I think the parallel package can be useful, but is not available. What I can do?
When I try to install the following appears
> install.packages("parallel")
Installing package into ‘/home/hector/R/x86_64-pc-linux-gnu-library/3.3’
Warning in install.packages :
package ‘parallel’ is not available (for R version 3.3.1)
Warning in install.packages :
package ‘parallel’ is a base package, and should not be updated
Here is my sessionInfo:
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS
locale:
[1] LC_CTYPE=es_CL.UTF-8 LC_NUMERIC=C LC_TIME=es_CL.UTF-8
[4] LC_COLLATE=es_CL.UTF-8 LC_MONETARY=es_CL.UTF-8 LC_MESSAGES=es_CL.UTF-8
[7] LC_PAPER=es_CL.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=es_CL.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.3.1
Some packages are coming with R as recommended packages, like parallel, compiler and mgcv. You don't need to install or update them; when you upgrade your R version, they will be upgraded, too, if new package release is available.
These packages are not loaded on R start-up; but you can get them immediately by
library(parallel)
library(compiler)
library(mgcv)
an so on.
Since yesterday, I cannot load some common used packages, e.g. reshape2 and stringr through library command.
Step to reproduce my problem:
1) Start a new session in Rstudio server (Version 0.99.467). I also kill the active-sessions in Rstudio server.
2) Run these codes
library(ggplot2)
library(stringr)
3) Get an error message:
Error in unloadNamespace(package) :
namespace ‘stringr’ is imported by ‘reshape2’ so cannot be unloaded
Show Traceback
Rerun with Debug
Error in library(stringr) : “stringr” version 0.6.2 cannot be unloaded.
But I don't get error if stringr is loaded before ggplot2. How should I fix this problem. Thanks for any suggestions.
I may have to update R to 3.2
My R session info:
R version 3.1.3 (2015-03-09)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)
locale:
[1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8
[5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8 LC_PAPER=en_AU.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggplot2_1.0.0
loaded via a namespace (and not attached):
[1] colorspace_1.2-4 digest_0.6.4 grid_3.1.3 gtable_0.1.2 MASS_7.3-39 munsell_0.4.2 plyr_1.8.1
[8] proto_0.3-10 Rcpp_0.11.2 reshape2_1.4 scales_0.2.4 stringr_0.6.2 tools_3.1.3
I resolved my problem through updating R and all R packages.
I guess the problem is caused by old version of stringr or reshape2 as I install the same packages in different places (system folder or personal library). R tried to load a old version of package.
Even though it is a good practice to update R for me it was not necessary to solve the same issue. The problem can result from few .libPaths(). With .libPaths("C:/Program Files/R/R-3.4.3patched/library") you can point out one folder. After that just reinstall of packages, and it should work.
My code:
> .libPaths()
[1] "L:/My Documents/R/win-library/3.4" "C:/Program Files/R/R-3.4.3patched/library"
> .libPaths("C:/Program Files/R/R-3.4.3patched/library")
> packages<-c('ggplot2','data.table','knitr','xtable')
> install.packages(packages)
> lapply(packages,library,character.only=T)
Even though the issue is solved I hope it will help someone.
I am trying to install the package rpivottable via install_github.
When trying I get the error:
Downloading github repo smartinsightsfromdata/rpivotTable#master
Installing rpivotTable
"C:/R/R-PORT~1/App/R-PORT~1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL \
"C:/Users/..../AppData/Local/Temp/RStudioPortableTemp/RtmpyAFPYw/devtools1df857205157/smartinsightsfromdata-rpivotTable-4c7d219" \
--library="C:/R/R-Portable/App/R-Portable/library" --install-tests
Error: Command failed (5)
Rtools is properly installed, find_rtools returns TRUE.
I am running R on the Rportable version due to limitations on admin policies on the machine. In particular I had to set the PATH from R as I don't have access from Windows, but after installing and reinstalling the PATH contains the two paths to Rtools and gcc bins.
The information on my sessionInfo is here:
R version 3.1.3 (2015-03-09)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Australia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shiny_0.11.1 devtools_1.8.0
loaded via a namespace (and not attached):
[1] bitops_1.0-6 digest_0.6.8 git2r_0.10.1 htmltools_0.2.6 httpuv_1.3.2 httr_0.6.1 memoise_0.2.1 mime_0.3 R6_2.0.1
[10] Rcpp_0.11.6 RCurl_1.95-4.6 RJSONIO_1.3-0 rversions_1.0.0 stringr_0.6.2 tools_3.1.3 XML_3.98-1.1 xtable_1.7-4
I don't think the problem is related to the package specifically since before I had the same problem with htmlwidgets if try to install via install_github, and I managed to install it directly from CRAN to solve the problem.
I have checked the code of install_github but I can't find what generates the command failed(5) error message. I have got lost after going down a few levels in the call stack.
Any help would be appreciated.
I am unable to install e1071 on my ubuntu machine.
I tried using:
sudo apt-get install r-cran-e1071
gives an error message:
Warning messages:
1: In open.connection(con, "r") :
unable to connect to 'cran.r-project.org' on port 80.
2: E: Unable to locate package r-cran-e1071
and
install.packages("e1071", dep = TRUE, type = "source")
gives an error message:
package ‘e1071’ is not available (for R version 2.15.2)
sessionInfo() gives:
R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_IN LC_NUMERIC=C LC_TIME=en_IN
[4] LC_COLLATE=en_IN LC_MONETARY=en_IN LC_MESSAGES=en_IN
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_IN LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tcltk_2.15.2 tools_2.15.2
The package e1071 depends on package class. The package class depends on R (≥ 3.0.0). Hence, you should update to a more recent R version.
Like #SvenHohenstein already said, the package needs a different version of R. What you can do is get an old version of the package from its archives, but you'll probably have to install older versions of other packages. In addition, you'll have to build the old version of the package from source as no binary versions are archived. Simply updating to a new R version is much easier...