Learn R Programming

rbi.helpers (version 0.4.0)

numeric_to_time: Convert numeric times to actual times or dates

Description

This function converts from numeric times (i.e., 0, 1, 2, ...) to actual times or dates

Usage

numeric_to_time(x, origin, unit, ...)

Value

a list of data frames as returned by bi_read, but with real times

Arguments

x

a libbi object which has been run, or a list of data frames containing state trajectories (as returned by bi_read)

origin

the time origin, i.e. the date or time corresponding to time 0

unit

the unit of time that each time step corresponds to; this must be a unit understood by lubridate::period, optionally with a number in advance, e.g. "day" or "2 weeks" or "3 seconds"

...

any arguments for bi_read (e.g., file)