Skip to content

Commit

Permalink
Update to jamesdemodata 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stefvanbuuren committed Jun 11, 2023
1 parent bd520e8 commit 56cb9d0
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Author: Stef van Buuren
Maintainer: Stef van Buuren <stef.vanbuuren@tno.nl>
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
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/growthcharts/bdsreader> for installation notes of `bdsreader`.
Expand Down
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,42 @@ 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:

``` 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
## <int> <chr> <date> <date> <date> <chr> <chr> <chr> <dbl> <dbl>
## 1 -1 Laura S 1989-01-21 NA 1961-07-22 0 <NA> female 276 39
## # ℹ 6 more variables: smo <int>, bw <dbl>, hgtm <dbl>, hgtf <dbl>, agem <dbl>,
## # etn <chr>

``` r
timedata(tgt)
```

## # A tibble: 58 × 8
## age xname yname zname zref x y z
## <dbl> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl>
## 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 <https://github.com/growthcharts/bdsreader> for installation notes
of `bdsreader`.

0 comments on commit 56cb9d0

Please sign in to comment.