Calculate the number of shares across all equity asset classes
Source:R/calc_shares_all_classes.R
calc_shares_all_classes.Rd
calc_shares_all_classes()
calculates the number of shares
across all equity asset classes. The asset class is defined by the value in
asset_type_id
, and only asset classes included in include_types
are
summed.
calc_shares_all_classes()
assumes that all input values are from the same
entity/company, so a single summed value is returned. If it is desired to
calculate the shares in all classes for multiple entities at the same time,
a typical usage would be to apply this function "by" some entity id, e.g.
mutate(data, shares_all_classes = calc_shares_all_classes(shares_outstanding, asset_type_id), .by = "entity_id")
For more details see vignette("share_ownership_methodology")
.
Usage
calc_shares_all_classes(
shares_outstanding,
asset_type_id,
include_types = c("CP", "EQ", "PF")
)