-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify canonical units (time, amount, and volume) for outputs #197
Comments
This is a good idea. My thoughts for this take two different forms, and I think that both of these would be helpful to implement. Please let me know your thoughts. (Do these seem like the right fit, is more needed?) The two ways that users may want to specify outputs are:
To make these clearer, I'll give two examples: 1. Pretend that my input units were these
For this, the idea would be to allow the user to change one or more types of input units to a different type of output units. For example, the user could say "I wish that my input were concentration of 'ug/mL' and time were 'days'." For that, I would introduce 4 new parameters to
Those would automatically generate the conversions between inputs and outputs as though the inputs were given as the outputs 2: I want units like these:For what is likely a common unit input of
you get units for Vss of As I started to write this as a set of additional inputs for each type of output, there are 11 (theoretically up to 16) new input arguments. That's too much, I think. The full set of unit classes that PKNCA supports is here: pknca/R/001-add.interval.col.R Lines 110 to 119 in 46a7091
I'm trying to think of a good input method so that, for each type of unit, the user can specify the type of output that they would want. This is technically possible already with the My initial brainstorm would be to have one more argument (that I think I'd call For volume here, I'm thinking something like What if both are givenOne other challenge here is what to do if both unit-modifiers are given. I think that the default would be first choice to use the second of the options above and the second choice would be to use the first of the options above. Thoughts? |
I think this sounds good. However I'm more likely to use option 1 only :). But I can see other folks would find option 2 quite useful. In the instance when both are specified, I think the logic you've laid out is reasonable. I can see it being triggered with some of the more esoteric unit requests. |
…nd `timeu_pref` arguments (fix #197)
Option 1 is now handled. (Edit: it now does work with |
I think it would be useful to be able to specify output units more generally such as: have all volumes in mL, all time in days, and all amounts in mg. Then have the parameters automatically converted into those units (e.g. CL would be mL/day or ml/day/kg, half-life would be in day, etc).
The text was updated successfully, but these errors were encountered: