Skip to content

How can I modify the rxode2 model structure at a lower level than the piping interface? #271

Answered by mattfidler
billdenney asked this question in Q&A
Discussion options

You must be logged in to vote

fit$fun is a calculated object, so in essence it is read-only.

However, in theory if you wanted to, you could

  1. Assign the function to a new variable
  2. Modify the function however you want .
  3. You could evaluate the new function to create a new ui object.

This is what is done in a similar function in nlmixr2est. Thisuses a ui$iniDf and a quoted model block to produce a new ui object.

This is an example of how it works:

https://github.com/nlmixr2/nlmixr2extra/blob/cb1c507f217bd208e003cfe1a461c6bb69bb027b/R/precondition.R#L73-L75

And this is the code:

https://github.com/nlmixr2/nlmixr2extra/blob/cb1c507f217bd208e003cfe1a461c6bb69bb027b/R/precondition.R#L6-L19

Replies: 3 comments 13 replies

Comment options

You must be logged in to vote
1 reply
@billdenney
Comment options

billdenney Sep 7, 2022
Maintainer Author

Answer selected by billdenney
Comment options

You must be logged in to vote
7 replies
@dzianismr
Comment options

@mattfidler
Comment options

@mattfidler
Comment options

@mattfidler
Comment options

@dzianismr
Comment options

Comment options

You must be logged in to vote
5 replies
@mattfidler
Comment options

@dzianismr
Comment options

@mattfidler
Comment options

@mattfidler
Comment options

@billdenney
Comment options

billdenney Jan 5, 2023
Maintainer Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants