Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
## daily stock market data from Yahoo
getStockMarketData <- function(symbol = "VOW4.DE"){
if(str_detect(symbol, ":")){
symbol <- paste(str_split_fixed(symbol, ":", 2)[,2], str_split_fixed(symbol, ":", 2)[,1], sep=".")
URL <- paste("",symbol)
dat <- read.csv(URL)
dat$Date <- as.Date(dat$Date, "%Y-%m-%d")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment