View source: R/01.firm_query.R
query.firm | R Documentation |
firm
object (legal person)Function to extract information from a firm
object (legal person)
query.firm(firm, which, naming = TRUE)
firm |
Firm which to extract information from |
which |
Information to extract, minimum unambiguous substring. Possible values (one or more):
- |
naming |
Whether to name the result after the querie information (defaults to |
Depends on the information queried. One (or, if length(which)>=2
, a list
of two or more) of the following:
name |
A string representing the name of the firm |
id |
A string representing the ID of the firm (usually its ticker) |
legal_form |
A string representing the firm's legal form |
sector |
A string indicating the sector in which the firm operates (possibly a NACE rev. 2 code) |
revenues |
A numeric (double) quantifying yearly revenues |
capitalisation |
A numeric (double) quantifying capitalisation |
management |
A vector of strings representing the members of the board |
ownership |
A vector of strings representing the owner(s) |
shares |
A numeric (double) vector indicating the shares controlled by (each of) the owner(s) |
currency |
A string indicating the currency in which revenues and capitalisation are denominated |
Telarico, Fabio Ashtar
query.firms query.firms.dataframe
# Query Apple's capitalisation
data('firms_US')
list2env(firms_US, parent.frame())
query.firm(AAPL, which = 'capitalisation')
# Query British-American Tobacco's capitalisation using the common abbreviation 'cap'
data('firms_US')
list2env(firms_US, parent.frame())
query.firm(BTI, 'cap')
# Query General Motors's owners and their shares, but return an unnamed \code{\link{list}}
data('firms_US')
list2env(firms_US, parent.frame())
query.firm(GM, c('own', 'sha'), naming = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.