The function draw_chart() plots individual data on the growth chart.
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.- append
Optional vector of strings indicating which instrument to base D-score calculations on. Currently supports
ddiandgs1. Requires JSON schema V3.0 or later.- output
A string, either
"table","last_visit"or '"last_dscore"specifying the result. The default"table"returns with columns:"date"(date),"x"(age),"y"(D-score) and"z"(DAZ). The number of rows equals to the number of visits. Ifoutputequals"last_visit"the function returns only the last row. Ifoutputequals"last_dscore"the function returns only the D-score from the last row.- loc
Deprecated. Use
sessioninstead.- ...
Ignored
Examples
fn <- system.file("testdata", "Laura_S.json", package = "james")
df <- calculate_dscore(txt = fn)
head(df, 4)
#> [1] a n p d sem daz
#> <0 rows> (or 0-length row.names)