create.EfficientFrontier from the
PortfolioAnalytics package is outputting an error message that reads:
Error in `colnames<-`(`*tmp*`, value = c("mean", "StdDev", "out", "w.Asset1", : attempt to set 'colnames' on an object with less than two dimensions
Troubleshooting performed so far without success
- Searched for identical cases - found a few cases with the same error message but output from different functions
- Checked if the covariance matrix was not positive definite
- Had recently updated the zoo package so I reinstalled the older version
- Besides my own code, I tried to run the example codes I found in two different blogs however, I got the exact same error once I tried to execute the function "create.EfficientFrontier".
You can check the link below for the code and specific data set in order to try to reproduce my error:
Three different data sets and the same error, so I suppose I might have some basic misconfiguration issue on my RStudio.
Any ideas on what the culprit could be?
Thanks in advance!