# Load libraries
library(tidyverse)
library(tidyquant)
tq_get("AAPL", get = "stock.prices") %>%
as_xts(date_col = date)
# Non-Standard Evaluation (NSE)
x <- "date"
tq_get("AAPL", get = "stock.prices") %>%
as_xts_(date_col = x)
Run the code above in your browser using DataLab