title: Portfolio Frontier not Working for large dataset
body: <p>I have a time series object with stock returns since 2012. The portfolioFrontier function works fine to create my efficiency frontier until I expand the data set beyond the number of months. For example, there are 39 months I am looking at, and everything works fine with 38 stocks. But once I add the 39th stock (and 40th, etc.), I get an error. The code and error are below.</p>
  
  <p>dput : </p>
  
  <pre><code>returns &lt;- new("timeSeries", .Data = structure(c(-0.0108, 0.005, -0.0059, 0.0067, -0.0069, -0.0275, 
  0.0226, 0.0089, 0.0469, 0.0193, -5e-04, -0.03, -0.0483, 0.0251, 
  0.013, 0.0202, 0.019, 0.015, 0.0091, 0.002, -0.014, 0.0046, 0.002, 
  0.025, 0.008, 0.0177, -0.0023, 0.0023, -0.0217, 0.0045, 0.0117, 
  0.0081, 0.0345, 0.0332, 0.0098, 0.0086, -0.0362, -0.0137, 0.0162, 
  0.0276, 0.0749, 0.0691, 0.0275, -0.0278, -0.0442, 0.0226, -0.0136, 
  0.0305, 0.0178, 0.0061, 0.0034, 0.0039, -0.0042, -0.0017, 0.0039, 
  0.0083, -0.008, -0.0044, 7e-04, 0.0018, 0.008, -0.0057, 0.0044, 
  0.0043, 0.012, 0.0134, 0.003, 0.0078, -0.0092, 0.0113, 0.0132, 
  0.0168, 0.032, 0.037, 0.033, 0.017, -0.037, 0.027, 0.026, 0.018
  ), .Dim = c(8L, 10L), .Dimnames = list(NULL, c("Stock.A", "Stock.B", 
  "Stock.C", "Stock.D", "Stock.E", "Stock.F", "Stock.G", "Stock.H", 
  "Stock.I", "Stock.J")))
      , units = c("Stock.A", "Stock.B", "Stock.C", "Stock.D", "Stock.E",     "Stock.F", 
  "Stock.G", "Stock.H", "Stock.I", "Stock.J")
      , positions = c(1327968000, 1330473600, 1333152000, 1335744000,     1338422400, 
  1341014400, 1343692800, 1346371200)
      , format = "%Y-%m-%d"
      , FinCenter = "GMT"
      , recordIDs = structure(list(), .Names = character(0), row.names =     integer(0), class = "data.frame")
      , title = "Time Series Object"
          , documentation = "Tue Jun 23 13:48:36 2015"
      )
  </code></pre>
  
  <p>Code : </p>
  
  <pre><code>library(timeSeries)
  library(fPortfolio)
  # returns &lt;- read.csv("Not Working Excel File.csv")
  #lct &lt;- Sys.getlocale("LC_TIME"); Sys.setlocale("LC_TIME", "C")
  #returns[,1] = as.Date(as.character(returns[,1]),format="%d-%b-%y") 
  #Sys.setlocale("LC_TIME", lct)
  #returns = timeSeries(returns[,-1], charvec = returns[,1])
  Frontier &lt;- portfolioFrontier(returns)
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Error in `colnames&lt;-`(`*tmp*`, value = c("AAPL",  : 
    attempt to set 'colnames' on an object with less than two dimensions
  </code></pre>
  
  <p>How can I resolve this issue so that I can add how ever many stocks I want without adding dates?</p>
  
  <p>Edit: Here is a snapshot of what the dataset looks like.  <a href="http://i.imgur.com/i0hkBdY.png" rel="nofollow">http://i.imgur.com/i0hkBdY.png</a>
  So in this example with 8 months of data and only four stocks, the code I posted above works fine. But once I add 5 more stocks (9 total) I get the error listed above.</p>
  
  <p>Changing the data frame to a matrix yields the same error.
  Adding more months allows me to add more stocks, but I don't want more months.</p>