Description Usage Arguments Value Examples
View source: R/get_key_statistics.R
This function get the information from the key statistics page from yahoo finance. For individual statistics or statistics to calculate with, it is better to use 'quantmod::getQuote' together with 'quantmod::yahooQF'.
1 |
symbol |
a stock symbol |
Returns a data.frame containing the key statistics from the statistics page from Yahoo Finance. Available fields are symbol, statistic_group, statistic and value. All values are character values are only as good as the data on Yahoo.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
library(dplyr)
# returns the statistics for AAPL
aapl_stats <- get_statistics("AAPL")
# get all the profitability stats
aapl_stat %>%
filter(statistic_group == "Profitability")
# returns the statistics for AAPL and FB
symbols <- c("AAPL", "FB")
symbol_stats <- get_statistics(symbols)
symbol_stats %>%
filter(statistic == "Forward Annual Dividend Rate")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.