View source: R/download_data.R
download_data | R Documentation |
This function downloads stock data from https://finance.yahoo.com/.
download_data(
symbol,
from = "1902-01-01",
to = Sys.Date(),
file = NULL,
verbose = TRUE
)
symbol |
A |
from |
A |
to |
A |
file |
Either
|
verbose |
Set to |
The downloaded data has the following columns:
Date
: The date.
Open
: Opening price.
High
: Highest price.
Low
: Lowest price.
Close
: Close price adjusted for splits.
Adj.Close
: Close price adjusted for dividends and splits.
Volume
: Trade volume.
A data.frame
if file = NULL
.
### download 21st century DAX data
data <- download_data(symbol = "^GDAXI", from = "2000-01-03")
head(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.