| PreviousResult | R Documentation |
get_prev_result() identifies the previous test result for individual subjects and timepoints
in a longitudinal study.
add_prev_result() interpolates these previous test results into a data frame for further analysis.
add_prev_result(
object,
subject = "subject",
timepoint = "timepoint",
result = "result",
prev_result = "prev_result"
)
get_prev_result(
object,
subject = "subject",
timepoint = "timepoint",
result = "result"
)
object |
a |
subject |
|
timepoint |
|
result |
|
prev_result |
|
See Transitions details.
add_prev_result() |
A |
get_prev_result() |
An |
data.frame, Dates, ordered factor.
Other transitions:
PreviousDate,
Transitions,
uniques()
## Continuing example from `add_transitions()`
# subject, timepoint and result arguments all defaults and required types
Blackmore |> str()
# Previous test results as ordered factor
get_prev_result(Blackmore)
# Previous test result as column of data frame
(Blackmore <- add_prev_result(Blackmore)) |> head(32)
rm(Blackmore)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.