auto_units {invivoPKfit}R Documentation

Automatically select new time units

Description

Given a vector of time values in original units, this function selects new time units such that, when time is rescaled to the new units, the midpoint of the time vector is as close to 10 as possible.

Usage

auto_units(y, from, target = 10, period_units = time_units)

Arguments

y

A numeric vector of time values

from

The original units of 'y'

target

The target value (order of magnitude) for the midpoint of rescaled time values. Default 10.

period_units

A list of acceptable/understood time units. See Details. Default 'time_units'.

Details

# Acceptable/understood time units in 'period_units'

“' c("picoseconds", "nanoseconds", "microseconds", "milliseconds", "seconds", "minutes", "hours", "days", "weeks", "months", "years") “'

Value

Character: Automatically-selected new time units, which will be one of 'period_units'.

Author(s)

Caroline Ring


[Package invivoPKfit version 2.0.1 Index]