expand_observations: Insert observations into a data set

View source: R/data_set.R

expand_observationsR Documentation

Insert observations into a data set

Description

Insert observations into a data set

Usage

expand_observations(data, times, unique = FALSE, obs_pos = -1L)

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'

obs_pos

determines sorting order for observations; use '-1' (default) to put observations first; otherwise, use large integer to ensure observations are placed after doses

Details

Non-numeric columns will be dropped with a warning.

Value

A data frame with additional rows for added observation records.

Examples

data <- expand.ev(amt = c(100, 200, 300))

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


mrgsolve documentation built on Aug. 16, 2023, 5:07 p.m.