as.data.frame.state: Conversion of state object

Description Usage Arguments Value Author(s)

View source: R/conversion.R

Description

Convert state object to a data.frame

Usage

1
2
## S3 method for class 'state'
as.data.frame(x, row.names = NULL, ..., long = TRUE)

Arguments

x

object of class 'state'

row.names

names to be assigned to patches. If NULL, names will be numeric from 1 to number of patches. Note that these will actually be column values in the data.frame, rather than row.names.

...

unused arguments

long

if true, data frame is in long format with the columns patch, variable, and value. Column patch contains the patch name assigned through row.names (1:number of patches, if row.names is NULL. the column variable are the elements of patch ( susceptible, exposed, infected, recovred, transmission_rate, recovery_rate, birth_rate, death_rate ))

Value

data.frame

Author(s)

Sangeeta Bhatia


sangeetabhatia03/multipatchr documentation built on Jan. 29, 2020, 5:42 p.m.