The function draw_chart()
plots individual data on the growth chart.
Usage
calculate_dscore(
txt = "",
session = "",
format = "1.0",
output = c("table", "last_visit", "last_dscore"),
loc = "",
...
)
Arguments
- txt
A JSON string, URL, or file with BDS data in JSON format. Data should conform to the BDS JGZ 3.2.5 specification.
- session
Optional session key if data is already uploaded to
sitehost
.- format
JSON schema version, e.g.,
"3.0"
. Used when uploading.- output
A string, either
"table"
,"last_visit"
or '"last_dscore"
specifying the result. The default"table"
returns a table with four columns:"date"
,"x"
(age),"y"
(D-score) and"z"
(DAZ). The number of rows equals to the number of visits. Ifoutput
equals"last_visit"
the function returns only the last row. Ifoutput
equals"last_dscore"
the function returns only the D-score from the last row.- loc
Deprecated. Use
session
instead.- ...
Ignored
Examples
fn <- system.file("testdata", "Laura_S_dev.json", package = "james")
d <- calculate_dscore(txt = fn)
#> BDS 235 (Length/height in mm): has no value
#> BDS 245 (Body weight in grammes): has no value
#> BDS 252 (Head circumference in mm): has no value