Learn R Programming

aNCA (version 0.1.0)

PKNCA_create_data_object: Creates a PKNCA::PKNCAdata object.

Description

Creates a PKNCA::PKNCAdata object.

Usage

PKNCA_create_data_object(adnca_data)

Value

PKNCAdata object with concentration, doses, and units based on ADNCA data.

Arguments

adnca_data

Data table containing ADNCA data.

Details

This function creates a standard PKNCAdata object from ADNCA data. It requires the following columns in the ADNCA data:

  • STUDYID: Study identifier.

  • PCSPEC: Matrix.

  • ROUTE: Route of administration.

  • DOSETRT: Drug identifier.

  • USUBJID: Unique subject identifier.

  • ATPTREF: (Non- standard column). Can be any column, used for filtering the data for NCA

  • PARAM: Analyte.

  • AVAL: Analysis value.

  • AVALU: AVAL unit.

  • DOSEA: Dose amount.

  • DOSEU: Dose unit.

  • AFRLT: Actual time from first dose.

  • ARRLT: Actual time from reference dose.

  • NFRLT: Nominal time from first dose.

  • ADOSEDUR: Duration of dose.

  • RRLTU: Time unit.

  1. Creating pk concentration data using format_pkncaconc_data().

  2. Creating dosing data using format_pkncadose_data().

  3. Creating PKNCAconc object using PKNCA::PKNCAconc(). with formula AVAL ~ AFRLT | STUDYID + PCSPEC + DOSETRT + USUBJID / PARAM.

  4. Creating PKNCAdose object using PKNCA::PKNCAdose(). with formula DOSEA ~ AFRLT | STUDYID + DOSETRT + USUBJID.

  5. Creating PKNCAdata object using PKNCA::PKNCAdata().

  6. Updating units in PKNCAdata object so each analyte has its own unit.

Examples

Run this code
adnca_data <- data.frame(
STUDYID = rep("STUDY001", 6),
PCSPEC = rep("Plasma", 6),
ROUTE = rep("IV", 6),
DOSETRT = rep("DrugA", 6),
USUBJID = rep("SUBJ001", 6),
ATPTREF = rep(1, 6),
PARAM = rep("AnalyteA", 6),
AVAL = c(0, 5, 10, 7, 3, 1),
AVALU = rep("ng/mL", 6),
DOSEA = rep(100, 6),
DOSEU = rep("mg", 6),
AFRLT = c(0, 1, 2, 3, 4, 6),
ARRLT = c(0, 1, 2, 3, 4, 6),
NFRLT = c(0, 1, 2, 3, 4, 6),
ADOSEDUR = rep(0.5, 6),
RRLTU = rep("hour", 6)
)
PKNCA_create_data_object(adnca_data)

Run the code above in your browser using DataLab