append.CovT: Append time-varying covariates to an event data frame

View source: R/merge_functions.R

append.CovTR Documentation

Append time-varying covariates to an event data frame

Description

Append time-varying covariates to an event data frame

Usage

append.CovT(event.df, ...)

Arguments

event.df

The event dataframe to append to

...

Time-varying covariate dataframes to append

Details

If there are mismatched column names the resulting column will have NA entries for the records sourced from the input data frame that lacks those columns. For instance, if A.df and B.df input: append.events(A.df, B.df), with A.df having columns ID, TIME, x3 and B.df having columns ID, TIME, x4, the resulting dataframe will have columsn ID, TIME, x3, x4. Some of the entries for x3 and x4 will be NA.

This is expected behavior for merging time-varying covariates, because the covariates are not likely to have been measured at the same time as dosing and obersations. Specifically, dose and observation records will likely have NA values for the covariate columns.

NA values in columns should be addressed after the merge process is completed.

All input data frames must have ID and TIME columns.

Value

A tbl_df object with the appended data


qPharmetra/PMDatR documentation built on April 7, 2024, 5:42 p.m.