I am trying to replicate the book example, as in the following answer:
https://quant.stackexchange.com/a/3937
But I am getting this error:
frontier <- portfolioFrontier(data = lppData, spec = frontierSpec, constraints="LongOnly");
Error in get(as.character(FUN), mode = "function", envir = envir) : object 'solveRglpk' of mode 'function' was not found
I tried to solve calling library("Rglpk"), the error continues.
Any help would be appreciated. Robert
> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] fPortfolio_3011.81 fAssets_3011.83 fBasics_3011.87 timeSeries_3011.98
[5] timeDate_3011.99
loaded via a namespace (and not attached):
[1] boot_1.3-13 DEoptimR_1.0-2 ecodist_1.2.9 energy_1.6.2
[5] fCopulae_3011.81 fMultivar_3011.78 kernlab_0.9-19 MASS_7.3-35
[9] mnormt_1.5-1 mvnormtest_0.1-9 numDeriv_2012.9-1 parallel_3.1.2
[13] quadprog_1.5-5 RCurl_1.95-4.3 Rglpk_0.6-0 rneos_0.2-7
[17] robustbase_0.91-1 Rsolnp_1.14 Rsymphony_0.1-17 slam_0.1-32
[21] sn_1.1-1 stats4_3.1.2 truncnorm_1.0-7 XML_3.98-1.1
set optimization algorithm
Try to use one of them.Not solveRampl()