library("xts")
data(sample_matrix)
matrix_xts <- as.xts(sample_matrix, dateFormat = "Date")
head(matrix_xts)
class(matrix_xts)
highchart() %>%
hc_add_series_ohlc(matrix_xts)
## Not run:
#
# library("quantmod")
#
# x <- getSymbols("AAPL", auto.assign = FALSE)
# y <- getSymbols("SPY", auto.assign = FALSE)
#
# highchart() %>%
# hc_add_series_ohlc(x) %>%
# hc_add_series_ohlc(y)
#
# ## End(Not run)
Run the code above in your browser using DataLab