extra_field_calculator: Field calculator for time-comparison scale

Description Usage Arguments Details See Also

View source: R/internal.R

Description

internal function for calculating the extra fields needed for bullet charts

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
extra_field_calculator(
  file_name = NULL,
  sheet_name = "Sheet1",
  dataframe = NULL,
  indicator_name = "indicator_name",
  actual = "actual",
  actual_lastweek = "actual_lastweek",
  actual_lastyear = "actual_lastyear",
  target = "target",
  for_year = year(Sys.Date()),
  cal_type = "fis",
  remove_no_targets = FALSE
)

Arguments

file_name

path of Excel file

sheet_name

specify which sheet in Excel file

dataframe

specify R dataframe input

indicator_name

specify the name of the column that has your indicator/KPI names

actual

specify the name of the column that has the current value of your indicators/KPIs

actual_lastweek

specify the name of the column that has the indicator/KPI value from the previous week

actual_lastyear

specify the name of the column that has the indicator/KPI value from the previous year

target

specify the name of the column that has the target value for the indicator/KPI

for_year

specify the year in which the report is being made, Default: year(Sys.Date())

cal_type

define what calendar you are using. Options are "fis" for fiscal year starting

remove_no_targets

remove indicators with Targets == NA or 0, Default: FALSE October 1st, "cal" for calendar year starting January 1st, or enter your own custom date in the format "YYYY/MM/DD", Default: fis

Details

internal function for calculating the extra fields for the bullet chart

See Also

mutate read_excel


ACDIVOCATech/bulletchartr documentation built on July 28, 2020, 8:49 p.m.