require(rCharts)
require(quantmod)

spy <- getSymbols("SPY",auto.assign=FALSE)
colnames(spy) <- c("open","high","low","close","volume","adjusted")

spy.df <- data.frame(index(spy),spy)
colnames(spy.df)[1] <- "date"

nOHLC <- nPlot(
  x = "date",
  y = "close",
  data = spy.df,
  type = "ohlcBar"
)
nOHLC$srccode = 
  "nOHLC$srccode"
nOHLC