Learn R Programming

mrgsolve (version 1.5.1)

lctran: 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 data.frame lctran(data, warn = TRUE, ...)

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

uctran(data, ...)

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

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

Value

A data frame or event object with possibly renamed columns.

The input data set, with select columns made lower case.

Arguments

data

a data set with nmtran-like format.

...

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab