knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "50%", eval = TRUE, echo = TRUE )
YahooFinance
offers the possibility to access the Yahoo Finance market data in R and supports the tidyverse.
This package was ported from Julia's YahooFinance.jl and is available in Python as pyahoofinance.
```{R, eval = FALSE} install.packages("YahooFinance")
or use github ```{R, eval = FALSE} devtools::install_github("markushhh/YahooFinance")
Load the package and retrieve a time series.
library("YahooFinance") x <- get_symbols("GOOG", "2018-12-13", "2019-06-28") print(x)
library("YahooFinance") library("ggplot2") # for plots library("magrittr") # pipe %>% x <- get_symbols(c("JNJ", "AAPL", "ACN", "DHR", "DTE"), "2018-12-13", "2019-06-28") p <- x %>% ggplot(aes(Date, Close)) + geom_line(aes(col = Symbol), size = 1) + theme_bw() + xlab("") + ylab("")
```{R, include = FALSE} ggsave("man/figures/plot1.png", plot = p, dpi = 900, width = 16, height = 9)

This project is not associated with nor sponsored by Yahoo! Inc. Yahoo! Inc. is the exclusive owner of all trademark and other intellectual property rights in and to the YAHOO! and Y! trademarks (the "Trademarks"), including the stylized YAHOO! and Y! logos. Yahoo! Inc. owns trademark registrations for the Trademarks. ```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.