firm
object (legal person) as a data frameThis function can be fed either:
- a (possibly named) list
of objects of class firm
(see example 1); or
query.firms.dataframe(..., which, naming = TRUE, transposing = TRUE)
A data frame in structured as follows (or vice versa if transposing == TRUE
):
for each queried information; and
for each number of firm
Object/s which to extract information from (see 'Details')
Information to extract, minimum unambiguous sub-string. Possible values (one or more):
- name
Name of the firm
- id
ID of the firm, usually the ticker (if provided or otherwise known)
- legal_form
Legal form of the firm
- sector
Sector in which the firm operates
- revenues
Yearly revenues
- capitalisation
Capitalisation
- management
Members of the board
- ownership
Owner(s)
- shares
Share owned by (each of) the owner(s)
- currency
Currency in which revenues and capitalisation are denominated
Whether to name the result after the queried information (defaults to TRUE
)
If TRUE
(default) each row will correspond to a firm and each column to a variable.
Telarico, Fabio Ashtar
It is not recommended to use this function with management
, ownership
, or shares
unless transposing == FALSE
.
query.firm query.firms
# \donttest{
# Query Apple's, GM's, and BTI's market cap and revenues
data('firms_US')
query.firms.dataframe(firms_US, which = c('cap', 'rev'))
# Query GM's and BTI's market cap and revenues
data('firms_US')
list2env(firms_US, envir = parent.frame())
query.firms.dataframe(GM, BTI, which = c('cap', 'rev'))
# }
Run the code above in your browser using DataLab