Learn R Programming

epichains (version 0.1.1)

head.epichains: head and tail method for <epichains> class

Description

head and tail method for <epichains> class

Usage

# S3 method for epichains
head(x, ...)

# S3 method for epichains tail(x, ...)

Value

An object of class <data.frame>.

Arguments

x

An <epichains> object.

...

Further arguments passed to or from other methods.

Author

James M. Azam

Details

This returns the top rows of an <epichains> object, starting from the first known infectors.

To view the full output, use as.data.frame(<object_name>).

Examples

Run this code
set.seed(32)
chains_pois_offspring <- simulate_chains(
  n_chains = 10,
  statistic = "size",
  offspring_dist = rpois,
  stat_threshold = 10,
  generation_time = function(n) rep(3, n),
  lambda = 2
)
head(chains_pois_offspring)
set.seed(32)
chains_pois_offspring <- simulate_chains(
  n_chains = 10,
  statistic = "size",
  offspring_dist = rpois,
  stat_threshold = 10,
  generation_time = function(n) rep(3, n),
  lambda = 2
)
tail(chains_pois_offspring)

Run the code above in your browser using DataLab