top_table: top_table takes the name (outcol) of the top value of outvar...

View source: R/top_table.R

top_tableR Documentation

top_table takes the name (outcol) of the top value of outvar in a tidy table, bot_table takes the bottom value

Description

top_table takes the name (outcol) of the top value of outvar in a tidy table, bot_table takes the bottom value

Usage

top_table(df, outcol, outvar)

Arguments

outcol

Is the name of the row of interest

outvar

Is the column we want the top value of

Details

When you make a table using tabyl etc., you often want to find the 'top value row' to use in inline code

Examples


 video_outcomes_phil <- gg_video_breakdowns %>%
    filter(audience=="Philanthropy") %>%
    group_by(video_theme) %>%
    base_results_sum() 

top_outcome <- video_outcomes_phil %>% top_table(video_theme, `$/ result`)

rethinkpriorities/rp-r-package documentation built on Jan. 7, 2023, 10:11 p.m.