Skip to contents

Top market share data frame

Usage

concstats_top_df(x, y, digits = NULL)

Arguments

x

A data frame.

y

A non-negative vector of shares. All integers (e.g. sales) are converted to relative decimal numbers.

digits

An optional value for digits. Specifies the minimum number of significant digits to be printed in values. The default is NULL and will use base R print option. Significant digits defaults to 7. Values are restricted between 1 and default value.

Value

A data frame.

Examples

x <- data.frame(
firm = c("A", "B", "C", "D", "E"),
share = c(0.2,0.25,0.1,0.05,0.4)
)
concstats_top_df(x, "share", digits = 2)
#>   firm share
#> 5    E    40