Learn R Programming

mrgsolve (version 0.9.2)

expand_observations: Insert observations into a data set

Description

Insert observations into a data set

Usage

expand_observations(data, times, unique = FALSE)

Arguments

data

a data set or event object

times

a vector of observation times

unique

`logical`; if `TRUE` then values for `time` are dropped if they are found anywhere in `data`

Value

A data frame

Details

Non-numeric columns will be dropped with a warning.

Examples

Run this code
# NOT RUN {
data <- expand.ev(amt = c(100,200,300))

expand_observations(data, times = seq(0,48,2))

# }

Run the code above in your browser using DataLab