Skip to content
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

Simplify RxODE syntax #47

Merged
merged 1 commit into from
Apr 28, 2020
Merged

Conversation

mattfidler
Copy link
Contributor

Hi Andy,

I just submitted a pull request to simplify the RxODE syntax in your vignette. The new syntax is:

ff_ode_rx <- function(model_switch, xt, p, poped.db){
  times_xt <- drop(xt)
  et(0,amt=p[["DOSE"]], ii=p[["TAU"]], until=max(times_xt)) %>%
    et(times_xt) -> data
  
  out <- rxSolve(modrx, p, data, atol=1e-8, rtol=1e-8,maxsteps=5000,
                 returnType="data.frame")
  
  y <-  out$CP[match(times_xt,out$time)]
  
  return(list(y=matrix(y,ncol=1),poped.db=poped.db))
  
}

It skips some marginal post-processing and pre-processing and data accessing within R.

In addition I rebuilt the pkgdown website

@andrewhooker
Copy link
Owner

andrewhooker commented Apr 24, 2020

Great, thanks for the update! Should there be a speed up in computations as well?

@andrewhooker andrewhooker merged commit 457ee58 into andrewhooker:master Apr 28, 2020
@mattfidler
Copy link
Contributor Author

No speed up in computation based on current CRAN RxODE, but speedup will be coming in the next release;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants