curve: Detect individual PK curves

View source: R/curve.R

curveR Documentation

Detect individual PK curves

Description

curve() assigns a unique number to each PK curve in a data set.

Usage

curve(data)

Arguments

data

A data frame or data frame extension with ID, TIME, and EVID columns.

Details

A PK curve is defined as any sequence of consecutive 0s in the EVID column of length greater than or equal to 1, corresponding to the same ID.

curve() is primarily used by pk_plot() in order to draw separate lines for distinct PK curves belonging to the same individual.

Value

A tibble::tibble() with an appended column, CURVE, containing a unique number for each group of consecutive observations which are not separated by a non-observation data record.

Author(s)

Sandy Floren


saviclab/savictools documentation built on Dec. 7, 2023, 11:56 p.m.