Is there a convenient way to extract input units from pknca.
john-harrold opened this issue · 4 comments
john-harrold commented
So I want to extract the supplied units when running pk.nca()
. For example if nca_res below is the output from pk.nca() I'm currently doing something like this to extract the time units supplied:
time_units = nca_res$data$units[nca_res$data$units$PPTESTCD == "start", ][["PPORRESU"]]
But I don't think that would be ideal if say I did unit conversions somewhere along the way.
billdenney commented
That is the correct way to get the input units. If there are conversions, then they would be stored in the "PPSTRESU" column, and the conversion is in the "conversion_factor" columns of the same data frame where "PPORRESU" is stored.
Does that answer the question?
john-harrold commented
facepalm Sorry I misread the documentation :).
billdenney commented
All good 😊
billdenney commented
If the docs could be clarified, lemme know (PRs accepted!)