1
$\begingroup$

I am not able to find PortfolioAnalytics package for windows from CRAN. New to R, will greatly appreciate any help how to find and install this package.

$\endgroup$
  • 1
    $\begingroup$ temporarily (?) archived, you can find an old version here: cran.r-project.org/src/contrib/Archive/PortfolioAnalytics . Just download it, then R CMD INSTALL PortfolioAnalytics*.tar.gz $\endgroup$ – steveo'america May 15 '18 at 23:08
  • $\begingroup$ Thanks! I am totally novice in this area, when I run this I got "make" not found ... compilation failed.. I am running this on windows10. So I need to install "make"? what is the best source to install 'make'. Sorry to ask trivial questions! $\endgroup$ – zeusape May 17 '18 at 2:00
1
$\begingroup$

Download the zip file from https://github.com/braverock/PortfolioAnalytics Extract the files Then goto your CMD line. Goto the folder containing PortfolioAnalytics Type "R CMD build PortfolioAnalytics" Once its complete, it will display a message with the file name Type "R CMD INSTALL file-name

$\endgroup$
  • $\begingroup$ Thanks for the tip! Totally novice in this area, I got the following error when running build: "cannot open file 'man": no such file or directory $\endgroup$ – zeusape May 17 '18 at 1:51
  • $\begingroup$ We have all be there! I was getting errors when I tried to do that way too. Try this method, it worked for me: 1. install.packages("devtools") 2. devtools::install_github("braverock/PortfolioAnalytics") $\endgroup$ – boniface316 May 17 '18 at 2:59
  • $\begingroup$ Thanks again! I installed "devtools", but on step 2, I got:from URL api.github.com/repos/braverock/PortfolioAnalytics/zipball/… WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.0 was found. (Only the following incompatible version(s) of Rtools were found:3.5). I installed an earlier version of devtools, but still getting similar messages. Any idea? $\endgroup$ – zeusape May 18 '18 at 9:49
  • $\begingroup$ Is it an error or just warning? $\endgroup$ – boniface316 May 19 '18 at 3:13
  • $\begingroup$ It is an error and the package was not installed. $\endgroup$ – zeusape May 21 '18 at 1:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.