Title: | Achieve Numerical Conversion Between Units Commonly Used in Pharmacokinetics |
---|---|
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. |
Authors: | Fu Yongchao [aut, cre, cph] |
Maintainer: | Fu Yongchao <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-05 04:42:10 UTC |
Source: | https://github.com/cran/pk.unit.trans |
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.
unit_trans(value, from, to, mw = NULL)
unit_trans(value, from, to, mw = NULL)
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. |
Numerical Vector.
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
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