Skip to contents

This function creates a pharmacokinetic dose dataset from the provided concentration data.

Usage

format_pkncadose_data(
  pkncaconc_data,
  group_columns,
  dosno_column = NULL,
  time_column = "AFRLT",
  since_lastdose_time_column = "ARRLT"
)

Arguments

pkncaconc_data

A data frame containing the concentration data.

group_columns

A character vector specifying the columns to group by.

dosno_column

A character string specifying the dose number column.

time_column

A character string specifying the time column.

since_lastdose_time_column

A character string specifying the time since last dose column.

Value

A data frame containing the dose data.

Details

The function performs the following steps:

  • Arranges and groups the data by group_columns

  • Derives the dose time as: time_column - since_lastdose_time_column

  • Selects the first row within each group (arranged by since_lastdose_time_column)