Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/donordata_to_individual.R
This function takes data from the donordata package, extract cases identified by id
and save as a an object of class individual
. The function automatically calculates standard deviation scores and broken stick conditional means per visit.
1 2 3 | donordata_to_individual(con = NULL, dnr, id, ...)
donordata.to.individual(con = NULL, dnr, id, ...)
|
con |
A database connection. The default |
dnr |
A character indicating the source, e.g. |
id |
the id number of the individual in specified source. If specified as a vector, only the first element is used. |
... |
Additional parameter passed down to |
An object of class individual
. If id
is not found in data
dnr
, then the function will set only slots id
and dnr
.
donordata.to.individual()
is deprecated, but exported
for legacy reasons
Stef van Buuren 2017
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | require("donorloader")
smocc <- load_data(dnr = "smocc")
smocc_bs <- load_data(dnr = "smocc_bs")
lollypop <- load_data(dnr = "lollypop")
terneuzen <- load_data(dnr = "terneuzen")
terneuzen_bs <- load_data(dnr = "terneuzen_bs")
p <- donordata_to_individual(dnr = "smocc", id = 10001)
# from lollypop
# calculating Z-score relative to preterm growth references
q <- donordata_to_individual(dnr = "lollypop", id = 50001)
# use models argument to estimate brokenstick estimates
p <- donordata_to_individual(dnr = "terneuzen", id = 11,
models = "terneuzen_bs")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.