View source: R/Apply_Lookups.R
label_top | R Documentation |
Label Top X entries in a data frame
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
)
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 |
Add column variants, including summaries, and deflated dollars, to a contract dataset.
The revised data frame with the new variable
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.