Set Up Guide
UNECA
September 2024
vsreport.RmdIntroduction
vsreport is an R package designed to help with the
creation of CRVS reports from record level data. It will produce tables
in line with the best practice for CRVS reports.
Simple installation and Basic Usage
In order to use the vsreport as part of your pipeline
with your data, you will need to follow these straight forward
commands:
1) Install and Load the devtools Package
Install and load the devtools package if you haven’t
already. This will let you install packages from GitHub directly.
install.packages("devtools")
library(devtools)2) Install the vsreport Package from GitHub
Use the install_github() function from the
devtools package to install. You need to provide the
repository address in the format username/repository.
devtools::install_github("tech-acs/vsreport")During this installation, you will be asked to install some required
packages so that the vsreport works correctly, this might
take a few minutes. You might get some errors if your R
installation is old or there are some necessary package updates, usually
the messages on the Console are descriptive.
3) Use the vsreport Package in your Script
Once you have installed the package, here is a basic example of how to use vsreport:
library(crvspackage)
# Example Usage
age_grp_80 <- construct_age_groups(ageinyrs, start_age = 5, max_band = 80,
                                        step_size = 5, under_1 = TRUE)Sample Data Included in the Package
The package has four test datasets, one for each of:
- Birth data: Use the 
construct_sample_birth_data()function. - Death data: Use the 
construct_sample_death_data()function. - Marriages data: Use the
construct_sample_marriage_data()function. - Divorce data: Use the 
construct_sample_divorce_data()function. 
This test data should also serve as a good tool in order to test existing features or develop new ones.