Plot DV versus time
dv_time(
df,
x = pm_axis_time(),
y = pm_axis_dv(),
xunit = opts$time.unit,
yname = "DV",
group = "ID",
xs = list(),
ys = list(),
log = FALSE,
xby = NULL,
...
)
dv_tafd(df, x = pm_axis_tafd(), ...)
dv_tad(df, x = pm_axis_tad(), ...)
data frame to plot
character name for x-axis data
character name for y-axis data
time units; used to form x-axis label
used to form y-axis label
passed to scatt
see defx
see defy
if TRUE
, y-axis will be log-transformed
interval for x-axis breaks
passed to scatt
A single plot.
Plots are generated using y_time
,
which then calls scatt
.
Since this function creates a scatter plot,
both the x
and y
columns must
be numeric.
If the data set includes a BLQ
column,
the values in the y
column are
set to NA
when BLQ
is
not equal to 0
.
df <- pmplots_data_obs()
dv_time(df, yname="MyDrug (ng/mL)")
dv_time(df, yname="MyDrug (ng/mL)", xunit="day")
# Add a rug
df <- pmplots_data()
dv_time(df) + geom_rug(data = ~ dplyr::filter(.x,BLQ > 0))
#> Warning: Removed 68 rows containing missing values or values outside the scale range
#> (`geom_point()`).
#> Warning: Removed 68 rows containing missing values or values outside the scale range
#> (`geom_line()`).