Skip to contents

Table 4.4 Live births by age of mother and type of birth

Table 4.5 Live births by age and marital status of mother, urban areas

Table 4.6 Live births by age and marital status of mother, rural areas

Usage

create_t4.4_to_4_6(
  data,
  data_year = NA,
  col_var = fert_age_grp,
  by_var = birth1g,
  rural_urban = "no",
  tablename = "Table_4_4",
  output_path = NULL
)

Arguments

data

the dataframe being used

data_year

the year of the data needed

col_var

variable of data being used e.g. fert_age_grp

by_var

the variable the data is being grouped by

rural_urban

if this is no then no rural/urban split is used. Else specify "rural" or "urban"

tablename

name of the table being saved as a csv file

output_path

The path to export the generated table

Value

tabulated data

Examples

t4.4 <- create_t4.4_to_4_6(bth_data, data_year = 2022, col_var = fert_age_grp, by_var = birth1g, rural_urban = "no", tablename = "Table_4_4")
#> Error: object 'bth_data' not found
t4.5 <- create_t4.4_to_4_6(bth_data, year = 2022, col_var = fert_age_grp, by_var = birth3c, rural_urban = "urban", tablename = "Table_4_5")
#> Error in create_t4.4_to_4_6(bth_data, year = 2022, col_var = fert_age_grp,     by_var = birth3c, rural_urban = "urban", tablename = "Table_4_5"): unused argument (year = 2022)
t4.6 <- create_t4.4_to_4_6(bth_data, year = 2022, col_var = fert_age_grp, by_var = birth3c, rural_urban = "rural", tablename = "Table_4_6")
#> Error in create_t4.4_to_4_6(bth_data, year = 2022, col_var = fert_age_grp,     by_var = birth3c, rural_urban = "rural", tablename = "Table_4_6"): unused argument (year = 2022)