Extract individuals from SimInf_individual_events
Source: R/SimInf_individual_events.R
get_individuals.RdLookup individuals, in which node they are located and their age at a specified time-point.
Usage
get_individuals(x, time = NULL)
# S4 method for class 'SimInf_individual_events'
get_individuals(x, time = NULL)Details
All individuals must have an 'enter' event, otherwise an error is raised. An individual is included in the result if its 'enter' event occurs at or before the time-point, and it has no 'exit' event at or before the time-point. Individuals that have not yet entered are omitted, and so are individuals that have exited.
The node is the node where the individual was last registered; if the last event is an external transfer, the node is the destination of that movement. Node identifiers are returned as specified in the events, e.g. 'XY010'.
The age is the difference between the time-point and the 'enter' event of the individual. If the events were specified with dates, the age is in days, otherwise it is in the same unit as the time-points.
The rows in the returned data frame are ordered by id.