lctran: Change the case of nmtran-like data items

View source: R/data_set.R

lctranR Documentation

Change the case of nmtran-like data items

Description

Previous data set requirements included lower case names for data items like AMT and EVID. Lower case is no longer required. However, it is still a requirement that nmtran like data column names are either all lower case or all upper case.

Usage

lctran(data, ...)

## S3 method for class 'data.frame'
lctran(data, warn = TRUE, ...)

## S3 method for class 'ev'
lctran(data, ...)

uctran(data, ...)

## S3 method for class 'data.frame'
uctran(data, warn = TRUE, ...)

## S3 method for class 'ev'
uctran(data, ...)

Arguments

data

a data set with nmtran-like format or an event object.

...

for potential future use.

warn

if TRUE, a warning will be issued when there are both upper and lower case versions of any nmtran-like column in the data frame.

Details

Columns that will be renamed with lower or upper case versions:

  • AMT / amt

  • II / ii

  • SS / ss

  • CMT / cmt

  • ADDL / addl

  • RATE / rate

  • EVID / evid

  • TIME / time

If both lower and upper case versions of the name are present in the data frame, no changes will be made.

Value

A data frame or event object, with column names possibly converted to upper or lower case.

Examples

data <- data.frame(TIME = 0, AMT = 5, II = 24, addl = 2, WT = 80)
lctran(data)

data <- data.frame(TIME = 0, AMT = 5, II = 24, addl = 2, wt = 80)
uctran(data)

ev <- evd(amt = 100, evid = 3)
uctran(ev)

# warning
data <- data.frame(TIME = 1, time = 2, CMT = 5)
lctran(data)


mrgsolve documentation built on Oct. 18, 2024, 5:12 p.m.

Related to lctran in mrgsolve...