From 3f764ed7473d092e56ae732522d1fd2035885b7f Mon Sep 17 00:00:00 2001 From: Stef van Buuren Date: Thu, 5 Dec 2024 10:49:47 +0100 Subject: [PATCH] Update to chartcatalog 1.18.0 --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ R/ynames_lookup.R | 2 ++ data-raw/R/ynames_lookup.R | 16 ++++++++++++++++ data/ynames_lookup.rda | Bin 3215 -> 3265 bytes man/ynames_lookup.Rd | 2 ++ 6 files changed, 25 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 242e524..a3f0d13 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: chartcatalog Type: Package Title: Catalog of JAMES Growth Charts -Version: 1.17.1 +Version: 1.18.0 Authors@R: person("Stef", "van Buuren", email = "stef.vanbuuren@tno.nl", role = c("aut", "cre")) Maintainer: Stef van Buuren Description: Tools for naming growth charts, and methods for diff --git a/NEWS.md b/NEWS.md index 93b1896..d6c28ae 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# chartcatalog 1.18.0 + +* Extends the lookup table with a new field `refpkg` that indicates the package where the reference with name `refcode` can be found + # chartcatalog 1.17.1 * Adds getters for inverse transformations of `x` and `y` diff --git a/R/ynames_lookup.R b/R/ynames_lookup.R index 5a06833..2486236 100644 --- a/R/ynames_lookup.R +++ b/R/ynames_lookup.R @@ -28,5 +28,7 @@ #' then transform).} #' \item{refcode}{A string coding the reference name recognised by #' \code{centile::load_reference()}.} +#' \item{refpkg}{A string coding the package in which refcode can be found by +#' \code{centile::load_reference()}.} #' } "ynames_lookup" diff --git a/data-raw/R/ynames_lookup.R b/data-raw/R/ynames_lookup.R index f485ebe..e861bfa 100644 --- a/data-raw/R/ynames_lookup.R +++ b/data-raw/R/ynames_lookup.R @@ -364,6 +364,22 @@ from <- data.frame( ) ynames_lookup$refcode <- dplyr::left_join(from, conversion, by = c("lib", "clopus"))$centile +# repair faulty refcodes for WHO +ynames_lookup[ynames_lookup$refcode == "who_2011_bmi_female_", "refcode"] <- "who_2006_bmi_female_" +ynames_lookup[ynames_lookup$refcode == "who_2011_bmi_male_", "refcode"] <- "who_2006_bmi_male_" +ynames_lookup[ynames_lookup$refcode == "who_2011_hdc_female_", "refcode"] <- "who_2007_hdc_female_" +ynames_lookup[ynames_lookup$refcode == "who_2011_hdc_male_", "refcode"] <- "who_2007_hdc_male_" +ynames_lookup[ynames_lookup$refcode == "who_2011_hgt_female_", "refcode"] <- "who_2006_hdc_female_" +ynames_lookup[ynames_lookup$refcode == "who_2011_hgt_male_", "refcode"] <- "who_2006_hdc_male_" +ynames_lookup[ynames_lookup$refcode == "who_2011_wfh_female_", "refcode"] <- "who_2006_wfh_female_" +ynames_lookup[ynames_lookup$refcode == "who_2011_wfh_male_", "refcode"] <- "who_2006_wfh_male_" +ynames_lookup[ynames_lookup$refcode == "who_2011_wgt_female_", "refcode"] <- "who_2006_wgt_female_" +ynames_lookup[ynames_lookup$refcode == "who_2011_wgt_male_", "refcode"] <- "who_2006_wgt_male_" + +# add refpkg column +ynames_lookup$refpkg <- NA_character_ +ynames_lookup[strtrim(ynames_lookup$refcode, 2) %in% c("nl", "ph"), "refpkg"] <- "nlreferences" +ynames_lookup[strtrim(ynames_lookup$refcode, 3) == "who", "refpkg"] <- "centile" # save usethis::use_data(ynames_lookup, overwrite = TRUE) diff --git a/data/ynames_lookup.rda b/data/ynames_lookup.rda index 07e0595e084d65aa6da869492a5228cf53abf25d..3e92f15a17b007216732792159e412816dff125d 100644 GIT binary patch literal 3265 zcmZ`*2|Scr8-E#FlO+=&!pPVodkL4Q%#5uxhO*?dTr^YmU1%6axfshBTPO^g3E7t~ zGTFDAH4~|*OSZC>OW)AV{eJiNegE^m&vVZIoacFd=lPxYIq&&v?q^jEZDp)%n?sWY zfc%aK`uEKU)-CVvE4%33o@dM7rwstWzyLHY{D7}`P*=xla?XOBb($m8n@Jm$1MFw= zct0gWB#kX41?8jxe)-RE3SS5X_#5uUix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m$h~^X6B$}|xZCuSm$pf_$s*ys_`wOOG1<3~} zOD7_s+^P0aYx{BiyO!!{eF`0RR&Sfqn0AAVmoHRLZ-Cd2s;>IkT^PmCw+K%85`R7R zFi9*GJ!v!Gxz?{f-SL`VI6+@ISytv6*)VHB@YaQqmb$2L#cQessuZSMeHRt$PHof9 z3*SAGMY?Or-eT8kZ5`5L&m&x3gtLhuq-sLo-~@=qjRaxvjo<%UGN`A(c38EfD@e29#I7=BnDmaKzhBEqBPRjq_@uk%F6(&Y{iKfWbl+$o~T*}ql%3OXt6hSQCDyUC_C>DX> zYpYD*U(s9FmUsE{JwiOSzu@yrvSnZgBfdeVlrT-#T{8-lZ%r9_4erg~-L_*Pe6f1rYfRyT{jzGNiA2@QVjY9|gvw?qM3c+=O8ZFDXi%GJ o5_d4i$Vf0dhX**W{(DyT%pM%RzqW?jCwoEkLm3$^dz(D@H`gHVGXMYp diff --git a/man/ynames_lookup.Rd b/man/ynames_lookup.Rd index ade77f7..f5a92a3 100644 --- a/man/ynames_lookup.Rd +++ b/man/ynames_lookup.Rd @@ -30,6 +30,8 @@ then calculate reference) or either \code{"rt"} (first calculate reference, then transform).} \item{refcode}{A string coding the reference name recognised by \code{centile::load_reference()}.} +\item{refpkg}{A string coding the package in which refcode can be found by +\code{centile::load_reference()}.} } } \usage{