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