write_baseline_projection_hpop_summary: Write the baseline/projection data frame to the data sheet

Description Usage Arguments

View source: R/write_dataframes_hpop_summary.R

Description

Write the baseline/projection data frame to the data sheet

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
write_baseline_projection_hpop_summary(
  df,
  wb,
  sheet_name,
  ind_df,
  year,
  start_year,
  end_year,
  ind,
  value,
  transform_value,
  type_col,
  source_col,
  iso3,
  bounds,
  ind_ids
)

Arguments

df

data frame to be written

wb

a openxlsx workbook to be edited.

sheet_name

character name of the sheet to update

ind_df

data frame containing the indicators in the correct order and format to be used.

year

Column name of column with years.

start_year

Base year for contribution calculation, defaults to 2018.

end_year

End year(s) for contribution calculation, defaults to 2019 to 2025.

ind

Column name of column with indicator names.

value

Column name of column with indicator values.

transform_value

Column name of column(s) with transformed indicator values, used to calculate contributions.

type_col

Column name of column with type data.

source_col

Column name of column to store source information.

iso3

Column name of column with country ISO3 codes.

bounds

named integer vector identifying integer sheet start and end reference column. All parameters must be numerical. For converting Excel column references to integer references see openxlsx::int2col(). Must have the following named elements:

  • start_col: start column

  • end_col: end column

  • start_row: start row

  • end_row: end row

ind_ids

Named vector of indicator codes for input indicators to the Billion. Although separate indicator codes can be used than the standard, they must be supplied as a named vector where the names correspond to the output of billion_ind_codes().


ElliottMess/rapporteur documentation built on Jan. 28, 2022, 2:51 a.m.