time_comparison_flextable: Create a period comparison table and conditionally format as...

Description Usage Arguments Value

Description

Create a period comparison table and conditionally format as a FlexTable

Usage

1
2
3
time_comparison_flextable(week_comparison_df, final_week, previous_week,
  campaign_to_filter, campaign_col = "campaign", group_colname = "week",
  last_year_final_week = NULL, agg_fun)

Arguments

week_comparison_df

performance dataframe filtered to relevant periods for time comparison (e.g. just last-week, previous-week, and last-week-last-year)

final_week

string identifying the most recent period

previous_week

string identifying the previous period

campaign_to_filter

string or regexp indicating campaign to filter on

campaign_col

string identifying the "campaign" column for filtering

group_colname

period colname, typically "week"

last_year_final_week

optional string identifying a third period (e.g. for year-over-year reporting)

agg_fun

summarise function

Value

formatted flextable


brianwonch/mediamunger documentation built on May 13, 2019, 7:42 a.m.