loadStates {SMITIDstruct}R Documentation

loadStates

Description

Load Hosts states

Usage

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

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)

[Package SMITIDstruct version 0.0.5 Index]