knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of gsedread is to read validation data of the project Global Scales for Early Development (GSED).
Install the gsedread
package from GitHub as follows:
install.packages("remotes") remotes::install_github("d-score/gsedread")
There is no CRAN version.
You need access to the WHO SharePoint site and sync the data to a local OneDrive. In the file .Renviron
in your home directory add a line specifying the location of your synced OneDrive, e.g.,
ONEDRIVE_GSED='/Users/username/Library/CloudStorage/OneDrive-Sharedlibraries-WorldHealthOrganization/CAVALLERA, Vanessa - GSED Validation 2021_phase I'
After setting the environmental variable ONEDRIVE_GSED
, restart R, and manually check whether you are able to read the OneDrive directory.
dir(Sys.getenv("ONEDRIVE_GSED"))
The following commands reads all SF data from GSED Final Collated Phase 1 Data Files 18_05_22
directory and returns a tibble with one record per administration.
library(gsedread) data <- read_sf() dim(data)
Count the number of records per file:
table(data$file)
Process variable names user-friendly alternative:
rename_vector(colnames(data)[c(1:3, 19, 21:25)], lexout = "gsed2", trim = "Ma_SF_")
The package reads and processes GSED data. It does not store data. The read_sf()
and read_lf()
functions takes the following actions:
NA
, -8888
, -8,888.00
and -9999
values as NA
;file
and adm
;GSED_ID
.Item renaming with rename_variables()
relies on the item translation table at
https://github.com/D-score/gsedread/blob/main/inst/extdata/itemnames_translate.tsv.
This study was supported by the Bill & Melinda Gates Foundation. The contents are the sole responsibility of the authors and may not necessarily represent the official views of the Bill & Melinda Gates Foundation or other agencies that may have supported the primary data studies used in the present study.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.