-
Notifications
You must be signed in to change notification settings - Fork 0
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
Don't require model modification to set initial conditions #15
Comments
I vote for using nlmixr2 parsed models in case something is introduced in targets or nlmixr2 that doesn't play well together |
That is the path that I plan to pursue. I just need to be sure that it doesn't introduce any extra target running. The underlying issue there would be if the object digest changed from run-to-run. If digest changes are a problem, the better solution there would be to ensure that the digest did not change, but I've had some issues with that in the past due to the environment creation within |
This gets very hard very quickly with the possibility of piped models. The Are there any scenarios where an |
As long as it is assigned to an object it will be fine. If it goes through a pipeline into the
This should let it work with anything that can be converted to the UI object |
Note piped objects will not exist in the environment. The only issue I see is when a rxode2 function is in the environment but not evaluated. I guess you could loop over everything that is a function and try to evaluate to a ui object. If it works save it in the environment. This isn't ideal but could work. |
No |
I ended up looping over everything in the call rather than everything in the environment. That will hopefully catch anything that comes up. Would you mind taking a look at the PR to see if anything jumps out at you as an issue? |
Sure. I might add a test case to see if I can break it. I will probably do it by next week. |
Thanks. I'm going to merge the PR since the next feature will change code in similar places. |
Using a model that sets initial conditions (e.g.
pd(0) <- initial
) causes an error with thetargets
package (see ropensci/targets#876).Have
nlmixr2targets
automatically runnlmixr2()
on the object in-place so that it's not detected bytargets
as having an invalid syntax. An alternative option is to rewrite the model in-place to replace any initial condition setting with the currentpd(initial) <- initial
style used in the development version ofnlmixr2targets
.The text was updated successfully, but these errors were encountered: