From 56cb9d01b3ee9fc5e70fd7f883e92de4b9e7a6f3 Mon Sep 17 00:00:00 2001 From: Stef van Buuren Date: Sun, 11 Jun 2023 16:48:41 +0200 Subject: [PATCH] Update to jamesdemodata 0.10.0 --- DESCRIPTION | 2 +- NEWS.md | 5 +++++ README.Rmd | 8 ++++---- README.md | 29 +++++++++++++++++++++++++++-- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c2413e9..26293be 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -5,7 +5,7 @@ Author: Stef van Buuren Maintainer: Stef van Buuren Description: A collection of data sets to develop, test and demonstrate the Joint Automatic Measurement and Evaluation System (JAMES). -Version: 0.9.0 +Version: 0.10.0 Encoding: UTF-8 License: AGPL (>= 3) Copyright: Stef van Buuren 2021 diff --git a/NEWS.md b/NEWS.md index 6d2d53f..90c083d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# jamesdemodata 0.10.0 + +- Regenerates example and test files from `bdsreader` and `donorloader` +- Corrects problem with gestational ages in lollypop data + # jamesdemodata 0.9.0 - Manually: Make fields "organisationCode" and "Reference" conform to the V3.0 schema diff --git a/README.Rmd b/README.Rmd index cda6fb6..eaa541e 100644 --- a/README.Rmd +++ b/README.Rmd @@ -35,17 +35,17 @@ remotes::install_github("growthcharts/jamesdemodata") Test- en demo data are stored in the `inst/extdata` directory. In order to generate a file name of the SMOCC child Laura S use -```{r eval=FALSE} -fn <- system.file("extdata", "bds_v2.0", "smocc", "Laura_S.json", package = "jamesdemodata") +```{r} +fn <- system.file("extdata", "bds_v3.0", "smocc", "Laura_S.json", package = "jamesdemodata") ``` Read the data into R using the `bdsreader` package: -```{r eval=FALSE} +```{r} library(bdsreader) tgt <- read_bds(fn) -head(tgt) persondata(tgt) +timedata(tgt) ``` See for installation notes of `bdsreader`. diff --git a/README.md b/README.md index 77e23a9..1c64f52 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Test- en demo data are stored in the `inst/extdata` directory. In order to generate a file name of the SMOCC child Laura S use ``` r -fn <- system.file("extdata", "bds_v2.0", "smocc", "Laura_S.json", package = "jamesdemodata") +fn <- system.file("extdata", "bds_v3.0", "smocc", "Laura_S.json", package = "jamesdemodata") ``` Read the data into R using the `bdsreader` package: @@ -37,9 +37,34 @@ Read the data into R using the `bdsreader` package: ``` r library(bdsreader) tgt <- read_bds(fn) -head(tgt) persondata(tgt) ``` + ## # A tibble: 1 × 16 + ## id name dob dobf dobm src dnr sex gad ga + ## + ## 1 -1 Laura S 1989-01-21 NA 1961-07-22 0 female 276 39 + ## # ℹ 6 more variables: smo , bw , hgtm , hgtf , agem , + ## # etn + +``` r +timedata(tgt) +``` + + ## # A tibble: 58 × 8 + ## age xname yname zname zref x y z + ## + ## 1 0 age hgt hgt_z nl_1997_hgt_female_nl 0 48 -1.52 + ## 2 0 age wgt wgt_z nl_1997_wgt_female_nl 0 2.95 -1.06 + ## 3 0 age bmi bmi_z nl_1997_bmi_female_nl 0 12.8 0.259 + ## 4 0.101 age hgt hgt_z nl_1997_hgt_female_nl 0.101 53.5 -0.499 + ## 5 0.101 age wgt wgt_z nl_1997_wgt_female_nl 0.101 4.18 -0.162 + ## 6 0.101 age hdc hdc_z nl_1997_hdc_female_nl 0.101 37.6 0.418 + ## 7 0.101 age bmi bmi_z nl_1997_bmi_female_nl 0.101 14.6 0.231 + ## 8 0.101 age dsc dsc_z ph_2023_dsc_female_40 0.101 14.8 -0.321 + ## 9 0.159 age hgt hgt_z nl_1997_hgt_female_nl 0.159 56 -0.261 + ## 10 0.159 age wgt wgt_z nl_1997_wgt_female_nl 0.159 5 0.401 + ## # ℹ 48 more rows + See for installation notes of `bdsreader`.