Skip to contents

Top 5 market shares data frame

Usage

concstats_top5_df(x, y, na.rm = TRUE)

Arguments

x

A data frame.

y

A non-negative vector of shares.

na.rm

A logical vector that indicates whether NA values should be excluded or not. Must be either TRUE or FALSE. The default is TRUE. If set to FALSE the computation yields NA if NA values are present.

Value

A data frame, which indicates an id or firm column and the top 5 market shares in decimal form.

Examples

# some data
id <- c(1, 2, 3, 4, 5)
x <- c(0.2, 0.25, 0.4, 0.1, 0.05)
test_df <- data.frame(id, x)