Open tamuri opened 5 years ago
Centiles form from LMSgrowth:
Using sitar::LMS2z
## construct table of boys weight centiles by age for WHO standard
data(who06)
zs <- -4:4*2/3 # z-scores for centiles
ages <- 0:12/4 # 3-month ages
LMS2z(ages, as.matrix(zs), sex = 'm', measure = 'wt', ref = who06, toz = FALSE)
Hi Asif,
I’m not sure of the question… Are you pointing out that this code already does #8 ?
Best wishes, Tim
Sorry, Tim, it wasn't a question! I was sharing the code with @giordano who is currently implementing this feature.
Other things to implement in the centile tab (pull request #26):
LMS2z
, one for the table and the other for the plot). Look to other plotting libraries (plotly?) (PR #31)DT
(DataTable) for rendering the table in a nicer way (PR #31)Update: DT
makes handling the rounding much easier, you can control how to round each column
From Tim (https://github.com/UCL/LMSgrowth2/pull/43#issuecomment-602607350):
Some curves have duplicated ages, e.g. UK-WHO height and BMI at age 2 and 4 years, indicating that two distinct references meet at that age. Ideally they should plot both values at the duplicated age, so the line segment is vertical. But in practice just one of the two values is stored and plotted. Not sure how to handle this.
From Tim (https://github.com/UCL/LMSgrowth2/pull/43#issuecomment-602607350):
The age range for each reference is displayed. However this is not necessarily the age range for the current measurement, so there are missing data at the start of he range. Would it make sense for the age range to apply to the currently selected measurement?