new_case: Create a new case

Description Usage Arguments Details Author(s) Examples

View source: R/new_case.R

Description

This function creates a new case, with or without a known infector. If it is missing (NULL, default), the case is imported according to parameters in config.

Usage

1
2
3
4
new_case(infector = NULL, date = NULL, ..., config = new_config(...))

## S3 method for class 'case'
print(x, ...)

Arguments

infector

An optional infector; if provided, it must be a list with the following slots: 'location', 'dna'

date

The date at which the new case is infected; if the case is imported and this is not provided, defaults to 0.

...

further arguments passed to new_config

config

optionally, a config returned by new_config

x

A 'case' object, as returned by new_case.

Details

It calls upon new_location and new_dna to determine locations and DNA sequences.

Author(s)

Thibaut Jombart thibautjombart@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## imported cases
A <- new_case()
B <- new_case()
A
B

## transmission chain A -> C -> D
C <- new_case(A, date = 3)
D <- new_case(C, date = 10)

A
B
C
D

thibautjombart/quicksim documentation built on May 5, 2019, 2:42 a.m.