Skip to content
/ poputils Public

❗ This is a read-only mirror of the CRAN R package repository. poputils — Demographic Analysis and Data Manipulation. Homepage: https://bayesiandemography.github.io/poputils/https://github.com/bayesiandemography/poputils Report bugs for this package: https://github.com/bayesiandemography/poputils/issues

License

Notifications You must be signed in to change notification settings

cran/poputils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poputils

Lifecycle: experimental R-CMD-check Codecov test coverage CRAN status

Manipulate and analyse demographic data.

Installation

install.packages("poputils")

For end users

Data manipulation

  • logit(), invlogit() Logistic transformation
  • trim_01() Trim values to interval (0, 1)
  • rr3() Randomly round to base 3

Life expectancy, life tables

  • ex_to_lifetab_brass() Use the Brass logit model to derive life tables with specified life expectancies
  • lifeexp() Calculate life expectancy from mortality rates
  • lifetab() Calculate life tables from mortality rates
  • q0_to_m0() Infant mortality

Fertility

  • tfr() Calculate total fertility rates

Labels

  • age_labels() Create age labels
  • age_lower(), age_mid(), age_upper() Limits and midpoints of age groups
  • combine_age() Merge age group labels
  • reformat_age() Reformat age group labels
  • reformat_sex() Reformat sex labels
  • set_age_open() Specify oldest age group

For developers

Checking arguments

  • check_n() Check an integer scalar.

Data manipulation

  • check_no_overlap_colnums() Check for argument clashes
  • groups_colnums() Get column numbers for grouping variables
  • matrix_to_list_of_cols(), matrix_to_list_of_rows() Split matrix
  • to_matrix() Convert data frame to matrix

Labels

  • age_group_type() Infer type of age group label
  • check_age() Validity checks for age group labels
  • find_label_female(), find_label_male() Identify sex or gender labels
  • find_var_age(), find_var_sexgender(), find_var_time() Identify age, sex/gender, time variables

About

❗ This is a read-only mirror of the CRAN R package repository. poputils — Demographic Analysis and Data Manipulation. Homepage: https://bayesiandemography.github.io/poputils/https://github.com/bayesiandemography/poputils Report bugs for this package: https://github.com/bayesiandemography/poputils/issues

Resources

License

Stars

Watchers

Forks

Packages

No packages published