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

View source: R/conversion.R

as.data.frame.stateR Documentation

Conversion of state object

Description

Convert state object to a data.frame

Usage

## 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 Aug. 13, 2024, 4:05 p.m.