Learn R Programming

visualFields (version 0.2-4)

vfselectvisit: select visits per subject from a vf-object

Description

select a determined amount of visits a vf-object. This is done if the interest is to select the last n visits, or the first n visits, or visits within a range, etc

Usage

vfselectvisit( vf, sel = "last", numTests = 1,
               beginDate = NA, endDate = NA )

Arguments

vf
a vf-object
sel
Type of selection, do we want visits from last, from first first, within a date range, or specific visit numbers. Default is last
numTests
number of tests to select from last, first, or a date range. If sel is an array of indices or set to a date range, numTests is overruled. Default is 1
beginDate
when sel = "date" is date from (inclusive). If it is NA, then the data is set to 1900-01-01. Default is NA
endDate
when sel = "date" is date to (inclusive). If it is NA, then the data is set to today. Default is NA

Value

  • returns the subselected visits per subject. For those subject for which at least numTests visits could not be selected are completely removed

Examples

Run this code
vfselectvisit( vf91016left )

Run the code above in your browser using DataLab