loadStates: loadStates

Description Usage Arguments Value Examples

Description

Load Hosts states

Usage

1
loadStates(lhost, dfStates, id = "ID", colStates)

Arguments

lhost

a HostSet

dfStates

a data.frame with host ID and states in columns and time as value

id

colname for host ID

colStates

colnames of States columns

Value

lhost updated

Examples

1
2
3
4
5
6
7
path = system.file("extdata", "data-simul/", package="SMITIDstruct")
lhost <- list()
class(lhost) <- "hostSet"
lhost <- loadTree(lhost,paste(path,"/tree.txt",sep='')) 
obs <- read.table(paste(path,"/obs.txt",sep=''),header=TRUE, check.names=FALSE)
obs.states <- c(colnames(obs[-grep("ID|Tobs.*",colnames(obs))]))
lhost <- loadStates(lhost, obs, colStates=obs.states)

SMITIDstruct documentation built on June 14, 2019, 5:04 p.m.