Description Usage Arguments Details Value Author(s)
View source: R/select.all.first.R
This function orders the dataframe on patient and date, then selects all records for each patient that occur on the first day in the dataframe.
1 | select.all.first(x, lpnr = 'lpnr', date = 'diadat')
|
x |
dataframe with at least a field that uniquely identifies each patient and a date |
lpnr |
name of variable in |
date |
name of date variable, used to order |
The patient registries typically contain a variable called lpnr
and diadat
, so these are the default values used. It is advisable, but not necessary, to use one of the date datatypes for date
.
A dataframe ordered on lpnr
and date
, containing all records for each subject occuring on the earliest date.
Peter Konings
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.