Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

expand_observations

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

Examples

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

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

mrgsolve

Simulate from ODE-Based Models

v0.11.1
GPL (>= 2)
Authors
Kyle T Baron [aut, cre] (<https://orcid.org/0000-0001-7252-5656>), Bill Gillespie [ctb], Charles Margossian [ctb], Devin Pastoor [ctb], Bill Denney [ctb] (<https://orcid.org/0000-0002-5759-428X>), Dilawar Singh [ctb], Felicien Le Louedec [ctb] (<https://orcid.org/0000-0003-3699-2729>), Timothy Waterhouse [ctb] (<https://orcid.org/0000-0002-0954-9660>), Metrum Research Group [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.