Skip to content

Commit

Permalink
Adds support to draw_chart() for internal specification of the donor …
Browse files Browse the repository at this point in the history
…data
  • Loading branch information
stefvanbuuren committed May 10, 2024
1 parent 1d46d27 commit ca45f87
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 23 deletions.
12 changes: 3 additions & 9 deletions R/draw_chart.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
#' @param session OpenCPU session key with the uploaded data
#' @param dnr Donor data, Prediction horizon: `"0-2"`, `"2-4"`
#' or `"4-18"`. May also be `"smocc"`, `"lollypop"`,
#' `"terneuzen"` or `"pops"`.
#' `"terneuzen"` or `"pops"`. If not specified, then the choice
#' is made internally.
#' @param chartcode Optional. The code of the requested growth chart.
#' @param selector Either `"chartcode"`, `"data"` or `"derive"`.
#' The function can calculate the chart code by looking at the child
Expand Down Expand Up @@ -62,7 +63,7 @@ draw_chart <- function(txt = "",
side = "hgt",
curve_interpolation = TRUE,
quiet = FALSE,
dnr = "0-2",
dnr = NULL,
lo = NULL,
hi = NULL,
nmatch = 0L,
Expand Down Expand Up @@ -98,13 +99,6 @@ draw_chart <- function(txt = "",
}

selector <- match.arg(selector)
dnr <- match.arg(dnr,
choices = c(
"0-2", "2-4", "4-18", "smocc", "lollypop",
"terneuzen", "pops"
)
)

tgt <- get_tgt(txt = txt,
session = session,
format = format)
Expand Down
5 changes: 3 additions & 2 deletions man/draw_chart.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,15 @@
},
"chartplotter": {
"Package": "chartplotter",
"Version": "0.33.1",
"Version": "0.34.0",
"Source": "GitHub",
"Remotes": "growthcharts/bdsreader, growthcharts/centile, growthcharts/chartbox, growthcharts/chartcatalog, growthcharts/curvematching, growthcharts/jamesdemodata, growthcharts/nlreferences, growthcharts/donorloader",
"RemoteType": "github",
"RemoteHost": "api.github.com",
"RemoteUsername": "growthcharts",
"RemoteRepo": "chartplotter",
"RemoteRef": "master",
"RemoteSha": "601e11226361e71819de4b9e79bf9255a3b4fd0a",
"Remotes": "growthcharts/bdsreader, growthcharts/centile, growthcharts/chartbox, growthcharts/chartcatalog, growthcharts/curvematching, growthcharts/jamesdemodata, growthcharts/nlreferences, growthcharts/donorloader",
"RemoteUsername": "growthcharts",
"RemoteRef": "HEAD",
"RemoteSha": "ef531056ae0309bde2615a08388aa86d09e1e9a6",
"Requirements": [
"R",
"brokenstick",
Expand All @@ -298,7 +298,7 @@
"tidyr",
"utils"
],
"Hash": "fe6bae41c32fac33c73a5f45fdb51069"
"Hash": "4b9c5011ee805afb9415249964ae21f9"
},
"cli": {
"Package": "cli",
Expand Down Expand Up @@ -426,15 +426,15 @@
},
"donorloader": {
"Package": "donorloader",
"Version": "0.36.1",
"Version": "0.37.1",
"Source": "GitHub",
"Remotes": "growthcharts/bdsreader, stefvanbuuren/donordata",
"RemoteType": "github",
"RemoteHost": "api.github.com",
"RemoteUsername": "growthcharts",
"RemoteRepo": "donorloader",
"RemoteRef": "master",
"RemoteSha": "0cac26138806268e15f769af6176338554fe40bc",
"Remotes": "growthcharts/bdsreader, stefvanbuuren/donordata",
"RemoteUsername": "growthcharts",
"RemoteRef": "HEAD",
"RemoteSha": "95b157def8e68c70de17482fb297b78d896916d1",
"Requirements": [
"R",
"bdsreader",
Expand All @@ -443,7 +443,7 @@
"tibble",
"tidyr"
],
"Hash": "96625910f9ec660b4ab7f9c8cef4afbe"
"Hash": "503704dd61e356a2c7b9bed8ad8a28c8"
},
"dplyr": {
"Package": "dplyr",
Expand Down

0 comments on commit ca45f87

Please sign in to comment.