getPairs: Pairs with shared visit on a certain date

Description Usage Arguments Details Value Examples

Description

From a given list of patient with the clinic visit on a certain date the function returns all the pairs.

Usage

1
getPairs(ids)

Arguments

ids

a vector of patient identifiers

Details

This function is called by get_observed_pairs which date-wise finds all the pairs with at least one shared visit (for all the dates that appear in your database).

Value

a character vector containing the barcodes of the found pairs on a certain date

Examples

1
2
3
4
5
dates_long <- data.frame(subject=c(12,15,2,202,31,3), 
                         dates=as.Date(c(rep("2001-03-16", 5), "2011-03-17")))
# subjects with a visit on "2001-03-16"
id_s <- dates_long$subject[which(dates_long$dates==as.Date("2001-03-16"))]
getPairs(id_s)

alexmarzel/svisits documentation built on May 12, 2019, 1:36 a.m.