title: getYahooData (TTR) and getSymbols (quantomod) errors when importing data for particular tickers
body: <p>I'm trying to download the time series of the constituents of the NASDAQ-100. I want to do it using both <code>getSymbols</code> and <code>getYahooData</code> from the same authors in order to investigate eventual discrepancies further. It turns out that only the latter function is not able to import the data for "ADP" and "NVDA":</p>
  
  <pre><code>&gt; getYahooData("ADP")
  Error in NextMethod(.Generic) : 
    number of items to replace is not a multiple of replacement length
  </code></pre>
  
  <p>Furthermore, even though the adjusted prices correspond for all the tickers, the adjusted volume does not corresponds and I need to know the reason. The problem is aggravated by the fact that the tickers that present an error might not be always the same running the same code! On average I get error for the volume for around 6 tickers. I quick investigation shows that the discrepancy of the volume tends to occur only for the most recent period, even though the price adjustment is backward.</p>
  
  <pre><code>require(quantmod) # for getSymbols
  require(TTR) # for getYahooData
  constitutents = c("AAL","AAPL","ADBE","ADI","ADP","ADSK","AKAM","ALXN","AMAT",
                    "AMGN","AMZN","ATVI","BBBY","BIDU","BIIB","BMRN","CA","CELG",
                    "CERN","CHKP","CHTR","CMCSA","COST","CSCO","CSX","CTRP",
                    "CTSH","CTXS","DISCA","DISCK","DISH","DLTR","EA","EBAY",
                    "ENDP","ESRX","EXPE","FAST","FB","FISV","FOX","FOXA","GILD",
                    "GOOG","GOOGL","HSIC","INCY","INTC","INTU","ILMN","ISRG","JD",
                    "KHC","LBTYA","LBTYK","LLTC","LMCA","LRCX","LVNTA","MAR",
                    "MAT","MDLZ","MNST","MSFT","MU","MXIM","MYL","NCLH","NFLX",
                    "NTAP","NVDA","NXPI","ORLY","PAYX","PCAR","PCLN","PYPL",
                    "QCOM","QVCA","REGN","ROST","SBAC","SBUX","SIRI","SNDK",
                    "SRCL","STX","SWKS","SYMC","TMUS","TSCO","TSLA","TRIP","TXN",
                    "ULTA","VIAB","VOD","VRSK","VRTX","WBA","WDC","WFM","XLNX",
                    "YHOO")
  errorsList = NULL
  for(symbol in constitutents) {
      # Download the time series of the ticker indicated by 
      # the symbol
      getSymbols(symbol, from="1900-01-01")
      # Adjust the time series for splits and dividends
      assign(symbol, adjustOHLC(get(symbol, pos=.GlobalEnv), symbol.name=symbol,
                                adjust=c("split","dividend")))
      # The function getYahooData fails to import the time series for
      # the following two tickers. An error message is retrieved.
      if (symbol=="ADP")next
      if (symbol=="NVDA")next
      # Import the same data again using a different function from the same
      # authors.
      data = getYahooData(symbol)
      # Check if the traded volume for the data obtained using two different
      # functions correspond each other.
      volumeMismatch = min(data[ ,5] - get(symbol, pos=.GlobalEnv)[ ,5])
      if (abs(volumeMismatch)&gt;1e-6) {
          errorsList = c(errorsList, symbol)
          print(paste(symbol, "presents an mismatch for the volume"))
      } else {
          print(paste("getYahooData and getSymbols corresponds for", symbol))
      }
  }
  
  &gt; errorsList
  [1] "GOOGL" "HSIC"  "INCY"  "LVNTA" "VRTX"  "YHOO" 
  </code></pre>
  
  <p>QUESTION 1: Why <code>getYahooData</code> is unable of importing the data for "ADP" and "NVDA".
  QUESTION 2: What is the reason for the discrepancy of the volume for variable tickers?</p>