query.firms.dataframe function

Function to extract information from multiple firm object (legal person) as a data frame

Function to extract information from multiple firm object (legal person) as a data frame

This 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)

Arguments

  • ...: Object/s which to extract information from (see 'Details')
  • which: 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
  • naming: Whether to name the result after the queried information (defaults to TRUE)
  • transposing: If TRUE (default) each row will correspond to a firm and each column to a variable.

Returns

A data frame in structured as follows (or vice versa if transposing == TRUE):

  • a row: for each queried information; and
  • a column: for each number of firm

Details

It is not recommended to use this function with management, ownership, or shares unless transposing == FALSE.

Examples

# 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'))

See Also

query.firm query.firms

Author(s)

  • Maintainer: Fabio Ashtar Telarico
  • License: GPL (>= 3)
  • Last published: 2024-10-31