View source: R/01.firm_register.R
| find.firms | R Documentation |
firms (legal persons) using data from 'Yahoo! Finance'If legal_form is a vector containing:
- one or more NULL elements, the corresponding firm's legal form will be JSC;
- one or more NAs, the corresponding firm's legal form will be NA.
find.firms(
tickers,
name = NULL,
ticker_is_id = TRUE,
legal_form = NULL,
sector_granularity = 1,
managers_remove_salutation_title = TRUE,
managers_only_surname = FALSE
)
tickers |
The firms' ticker. |
name |
Provide the firms' names as a vector of the same length as tickers. If not provided, |
ticker_is_id |
Should the ticker be used as the firm's id? |
legal_form |
The firm's legal form of the firm. Possible values:
- a vector of strings (e.g., 'LLC', 'Private', 'GmbH', etc.) of the same length as |
sector_granularity |
Sector in which the firm operates. Possible values:
- |
managers_remove_salutation_title |
Yahoo! Finance provide salutation titles before the names of the managers. If this is |
managers_only_surname |
Yahoo! Finance provide first, middle, and last name of the managers. If this is |
To ensure consistency, ticker_is_id, sector_granularity, managers_remove_salutation_title, and managers_only_surname cannot be vectors.
Tickers can be retrieved from [Yahoo! Finance](https://finance.yahoo.com/lookup/).
This function requires the package yahoofinancer to be installed. It is available from the CRAN by running install.packages('yahoofinancer').
An object of the S4 class firm containing several fields, only the first one of which is mandatory:
name |
Name of the firm (or ticker if no name was provided) |
id |
Firm' ticker (if ticker_is_id was 'TRUE') or nothing (otherwise) |
legal_form |
Legal form of the firm (may be null) |
sector |
Sector in which the firm operates (may be null) |
revenues |
Yearly revenues |
capitalisation |
Capitalisation |
management |
Members of the board |
ownership |
Owner(s) |
shares |
Share owned by (each of) the owner(s) |
currency |
Currency |
Telarico, Fabio Ashtar
find.firm
# Registering Apple, General Motors, and British American Tobacco automatically
#| Results are subject to the correct functioning of the package `yahoofinancer`
#| and of the Yahoo! Finance API
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.