Learn R Programming

OutbreakTools (version 0.1-0)

get.dates: Retrieve dates data

Description

get.dates is a generic function with a method for obkData, obkSequences and obkContacts objects. It can be used to retrieve dates stored in the object.

Usage

get.dates(x, ...)

get.ndates(x, ...)

## S3 method for class 'obkData': get.dates(x, data=c("all", "individuals", "records", "dna","context", "contacts"), ...)

## S3 method for class 'obkData': get.ndates(x, data=c("all", "individuals", "records", "dna","context", "contacts"), ...)

## S3 method for class 'obkSequences': get.dates(x, \dots)

## S3 method for class 'obkSequences': get.ndates(x, \dots)

## S3 method for class 'obkContacts': get.dates(x, \dots)

## S3 method for class 'obkContacts': get.ndates(x, \dots)

Arguments

x
an input object to seek dates from.
data
a character string indicating the name of the data field to look for. It can be 'all'(default), 'individuals', 'records' or 'context'.
...
currently not used.

Examples

Run this code
## LOAD DATA ##
data(ToyOutbreak)

## VARIOUS USE OF GET.DATES ##
get.dates(ToyOutbreak)

get.ndates(ToyOutbreak, "records")
get.dates(ToyOutbreak, "records")

get.ndates(ToyOutbreak, "contacts")
get.dates(ToyOutbreak, "contacts")

Run the code above in your browser using DataLab