select.all.first: Select all records for a patient occuring on the first date...

Description Usage Arguments Details Value Author(s)

View source: R/select.all.first.R

Description

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.

Usage

1
select.all.first(x, lpnr = 'lpnr', date = 'diadat')

Arguments

x

dataframe with at least a field that uniquely identifies each patient and a date

lpnr

name of variable in x that uniquely identifies each patient. Defaults to lpnr

date

name of date variable, used to order x. Defaults to diadat

Details

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.

Value

A dataframe ordered on lpnr and date, containing all records for each subject occuring on the earliest date.

Author(s)

Peter Konings


lemna/ugir documentation built on May 21, 2019, 3:07 a.m.