Type: | Package |
Title: | Achieve Numerical Conversion Between Units Commonly Used in Pharmacokinetics |
Version: | 0.1.0 |
Author: | Fu Yongchao [aut, cre, cph] |
Maintainer: | Fu Yongchao <3212418315@qq.com> |
Description: | Achieve internal conversions of mass units, molar units, and volume units commonly used in pharmacokinetics, as well as conversions between mass units and molar units. |
Imports: | stringi(≥ 1.8.4), maditr (≥ 0.8.4) |
License: | MIT + file LICENSE |
Depends: | R (≥ 4.1.0) |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
NeedsCompilation: | no |
Packaged: | 2024-10-31 18:43:03 UTC; admin |
Repository: | CRAN |
Date/Publication: | 2024-11-04 12:40:02 UTC |
pk.unit.trans
Description
Achieve numerical conversion between units commonly used in pharmacokinetics. such as: mg to ng, nmol to mol, ml to L, noml to mg, nmol/L to ng/mL.
Usage
unit_trans(value, from, to, mw = NULL)
Arguments
value |
Vector or 1 column form data frame, Must be numeric. |
from |
Vector or 1 column form data frame, Must be character. |
to |
Vector or 1 column form data frame, Must be character. |
mw |
molecular weight,Vector or 1 column form data frame, Must be numeric. |
Value
Numerical Vector.
Examples
unit_trans(1,"nmol/L","ng/mL",mw=150000) #return 150
unit_trans(1,"nM","ng/mL",mw=150000) #return 150
unit_trans(1,"nmol","mg",mw=150000) #return 0.15
unit_trans(1,"mg","ug") #return 1000
unit_trans(1,"mL","uL") #return 1000