label_top: Label Top X entries in a data frame

View source: R/Apply_Lookups.R

label_topR Documentation

Label Top X entries in a data frame

Description

Label Top X entries in a data frame

Usage

label_top(
  df,
  col,
  n = 5,
  weight = "Action_Obligation_OMB25_GDP23",
  top_name = NA,
  group_list = NA,
  time = "Fiscal_Year",
  recent = NA,
  retain_rank = FALSE,
  write_file = NA
)

Arguments

df

A data frame.

col

The column to be evaluated.

weight

The variable summed to determine top entries, by default Action_Obligation_OMB25_GDP23

top_name

The new column that will include

time

The variable used for when considering recent top entries, by default Fiscal_Year

recent

Value used to give extra weight to recently top entries rather than just the overall period

retain_rank

Retain any ranked variables created in processing.

write_file

File name in which to record the calculations underlying the labeling. Default is not to record.

group

Sub groupings by which to rank, by default not included

Details

Add column variants, including summaries, and deflated dollars, to a contract dataset.

Value

The revised data frame with the new variable


CSISdefense/csis360 documentation built on April 29, 2024, 5:30 p.m.