README.md

donorloader

R-CMD-check

The donorloader package is a space-efficient version of the donordata package. The package

Installation

You can install the development version from GitHub with

# install.packages("devtools")
devtools::install_github("growthcharts/donorloader")

Example

To access all smocc data, use

library(donorloader)
smocc <- load_data(dnr = "smocc")
head(smocc$child, 3)
#> # A tibble: 3 x 79
#>   src      id dob    sex   etn   edu      ga    bw  twin  agem   smo  hgtm  hgtf
#>   <chr> <dbl> <chr>  <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 smocc 10001 02-04… fema… NL    high     40  3960     0    33     0   167   192
#> 2 smocc 10002 05-04… male  NL    high     38  3210     0    38     0   164   186
#> 3 smocc 10003 05-04… fema… NL    high     40  4170     0    33     0   172   182
#> # … with 66 more variables: hgt_z_0 <dbl>, hgt_z_0.0767 <dbl>,
#> #   hgt_z_0.1533 <dbl>, hgt_z_0.25 <dbl>, hgt_z_0.3333 <dbl>, hgt_z_0.5 <dbl>,
#> #   hgt_z_0.625 <dbl>, hgt_z_0.75 <dbl>, hgt_z_0.9167 <dbl>,
#> #   hgt_z_1.1667 <dbl>, hgt_z_1.5 <dbl>, hgt_z_2 <dbl>, hgt_z_3 <dbl>,
#> #   wgt_z_0 <dbl>, wgt_z_0.0767 <dbl>, wgt_z_0.1533 <dbl>, wgt_z_0.25 <dbl>,
#> #   wgt_z_0.3333 <dbl>, wgt_z_0.5 <dbl>, wgt_z_0.625 <dbl>, wgt_z_0.75 <dbl>,
#> #   wgt_z_0.9167 <dbl>, wgt_z_1.1667 <dbl>, wgt_z_1.5 <dbl>, wgt_z_2 <dbl>,
#> #   wgt_z_3 <dbl>, hdc_z_0 <dbl>, hdc_z_0.0767 <dbl>, hdc_z_0.1533 <dbl>,
#> #   hdc_z_0.25 <dbl>, hdc_z_0.3333 <dbl>, hdc_z_0.5 <dbl>, hdc_z_0.625 <dbl>,
#> #   hdc_z_0.75 <dbl>, hdc_z_0.9167 <dbl>, hdc_z_1.1667 <dbl>, hdc_z_1.5 <dbl>,
#> #   hdc_z_2 <dbl>, hdc_z_3 <dbl>, bmi_z_0 <dbl>, bmi_z_0.0767 <dbl>,
#> #   bmi_z_0.1533 <dbl>, bmi_z_0.25 <dbl>, bmi_z_0.3333 <dbl>, bmi_z_0.5 <dbl>,
#> #   bmi_z_0.625 <dbl>, bmi_z_0.75 <dbl>, bmi_z_0.9167 <dbl>,
#> #   bmi_z_1.1667 <dbl>, bmi_z_1.5 <dbl>, bmi_z_2 <dbl>, bmi_z_3 <dbl>,
#> #   dsc_z_0 <dbl>, dsc_z_0.0767 <dbl>, dsc_z_0.1533 <dbl>, dsc_z_0.25 <dbl>,
#> #   dsc_z_0.3333 <dbl>, dsc_z_0.5 <dbl>, dsc_z_0.625 <dbl>, dsc_z_0.75 <dbl>,
#> #   dsc_z_0.9167 <dbl>, dsc_z_1.1667 <dbl>, dsc_z_1.5 <dbl>, dsc_z_2 <dbl>,
#> #   dsc_z_3 <dbl>, name <chr>
head(smocc$time, 3)
#> # A tibble: 3 x 85
#>   src      id   rec  nrec dob   dom      age sex   etn      ga    bw   hgt   wgt
#>   <chr> <dbl> <int> <int> <chr> <chr>  <dbl> <chr> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 smocc 10001     1    10 02-0… 02-0… 0      fema… NL       40  3960  52    3.96
#> 2 smocc 10001     2    10 02-0… 02-0… 0.0821 fema… NL       40  3960  55.6  4.05
#> 3 smocc 10001     3    10 02-0… 30-0… 0.159  fema… NL       40  3960  58.2  4.56
#> # … with 72 more variables: hdc <dbl>, dsc <dbl>, bds879 <int>, bds881 <int>,
#> #   bds883 <int>, bds884 <int>, bds885 <int>, bds886 <int>, bds887 <int>,
#> #   bds888 <int>, bds889 <int>, bds890 <int>, bds891 <int>, bds892 <int>,
#> #   bds893 <int>, bds894 <int>, bds896 <int>, bds897 <int>, bds898 <int>,
#> #   bds900 <int>, bds902 <int>, bds903 <int>, bds905 <int>, bds906 <int>,
#> #   bds907 <int>, bds909 <int>, bds910 <int>, bds912 <int>, bds921 <int>,
#> #   bds927 <int>, bds928 <int>, bds930 <int>, bds932 <int>, bds933 <int>,
#> #   bds935 <int>, bds936 <int>, bds937 <int>, bds938 <int>, bds940 <int>,
#> #   bds943 <int>, bds945 <int>, bds955 <int>, bds956 <int>, bds958 <int>,
#> #   bds959 <int>, bds961 <int>, bds962 <int>, bds964 <int>, bds966 <int>,
#> #   bds968 <int>, bds969 <int>, bds970 <int>, bds973 <int>, bds975 <int>,
#> #   bds976 <int>, bds978 <int>, bds980 <int>, bds982 <int>, bds984 <int>,
#> #   bds986 <int>, bds989 <int>, bds991 <int>, bds993 <int>, bds994 <int>,
#> #   bds1278 <int>, bmi <dbl>, hgt_z <dbl>, wgt_z <dbl>, hdc_z <dbl>,
#> #   dsc_z <dbl>, bmi_z <dbl>, wfh_z <dbl>

The donordata and donorloader packages contain unpublished data, so they live in private repositories.



stefvanbuuren/donorloader documentation built on June 30, 2021, 12:15 a.m.