growthcharts / chartplotter Goto Github PK
View Code? Open in Web Editor NEWAnalysing and Plotting Growth Curves
Home Page: http://growthcharts.org/chartplotter/
License: GNU Affero General Public License v3.0
Analysing and Plotting Growth Curves
Home Page: http://growthcharts.org/chartplotter/
License: GNU Affero General Public License v3.0
After updating R packages to R 4.2.1 I get
library(chartplotter)
fn <- system.file("extdata", "bds_v1.0", "smocc", "Laura_S.json", package = "jamesdemodata")
ind <- bdsreader::read_bds(fn)
g <- process_chart(ind, chartcode = "NJAA",
dnr = "smocc", period = c(0.5, 1.1667), nmatch = 10, break_ties = TRUE)
#> New names:
#> • `NA.` -> `NA....30`
#> • `NA..1` -> `NA..1...31`
#> • `NA..2` -> `NA..2...32`
#> • `NA..3` -> `NA..3...33`
#> • `NA.` -> `NA....47`
#> • `NA..1` -> `NA..1...48`
#> • `NA..2` -> `NA..2...49`
#> • `NA..3` -> `NA..3...50`
#> • `NA..4` -> `NA..4...51`
#> • `NA.` -> `NA....65`
#> • `NA..1` -> `NA..1...66`
#> • `NA..2` -> `NA..2...67`
#> • `NA..3` -> `NA..3...68`
#> • `NA..4` -> `NA..4...69`
grid::grid.draw(g)
#> Error in validGP(gp): must specify only one of 'font' and 'fontface'
Created on 2022-08-16 by the reprex package (v2.0.1)
The output "New names:" should not be there. Also, the validGP
error is novel.
There is a mismatch between
chartplotter::find_matches()
functionFor example, from chartplotter::find_matches()
we convert using clopus::nl1997
. No preterm
references are used for any case with ga <= 36
, which deviates from the Z-score as calculated in the donordata
package.
# transform into Z scale
z <- y2z(y = xy[[yname]], x = xy[["age"]], ref = clopus::nl1997,
yname = yname, sex = xy[["sex"]], sub = "NL",
drop = TRUE)
# predict according to the brokenstick model (Z scale)
df <- data.frame(age = xy["age"], z = z, id = 1)
colnames(df) <- c("age", paste(yname, "z", sep = "."), "id")
zhat <- predict(bsm, df, x = "knots", shape = "vector")
# back-transform prediction into Y scale
yhat <- z2y(z = zhat, x = get_knots(bsm), ref = clopus::nl1997,
yname = yname, sex = xy[["sex"]][1L], sub = "NL",
drop = TRUE)
The code is correct for terms, but not for pre-terms. Preferably, these conversions should be replaced by clopus::transform_z()
and clopus::transform_y()
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.