Sets the data points in a graphic object. The function will identify
and set all ynames
in the graph.
set_curves(
g,
target,
ynames,
curve_interpolation = TRUE,
nmatch = 0L,
matches = NULL,
dnr = NULL,
period = numeric(0),
show_realized = FALSE,
show_future = FALSE,
clip = TRUE
)
A gTree
object, typically loaded by
chartbox::load_chart()
A list with elements "psn"
and "xyz"
, e.g. as produced by
bdsreader::read_bds()
A vector with the names of the response variables
for which matches are sought, e.g. ynames = c("hdc", "hgt")
.
A logical indicating whether curve interpolation shoud be applied.
Integer. Number of matches needed. When
nmatch == 0L
no matches are sought.
List of vector containing the id's of the matches in
the donor data. List elements should be named after
ynames
. The default value (NULL
) indicates that no
matches are plotted.
A string with the name of the donor data
(currently available are smocc
, terneuzen
,
lollypop
and pops
)
A vector of length 2 with left and right ages
(decimal age). If length(period) == 0L
, then no curve
matching is done
A logical indicating whether the realized growth of the target child should be drawn
A logical indicating whether the predicted growth of the target child should be drawn
A logical indicating whether clipping is needed
The grid object g
with data points added.