{"id":14066471,"url":"https://github.com/metrumresearchgroup/mrgsolve","last_synced_at":"2026-04-22T23:00:51.226Z","repository":{"id":3989601,"uuid":"51610899","full_name":"metrumresearchgroup/mrgsolve","owner":"metrumresearchgroup","description":"Simulate from ODE-based population PK/PD and QSP models in R","archived":false,"fork":false,"pushed_at":"2026-04-21T01:52:07.000Z","size":38050,"stargazers_count":159,"open_issues_count":89,"forks_count":36,"subscribers_count":25,"default_branch":"main","last_synced_at":"2026-04-21T03:52:50.338Z","etag":null,"topics":["mrgsolve","ode","r","rstats"],"latest_commit_sha":null,"homepage":"https://mrgsolve.org","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metrumresearchgroup.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-02-12T19:25:20.000Z","updated_at":"2026-04-20T13:25:02.000Z","dependencies_parsed_at":"2026-01-17T11:08:46.345Z","dependency_job_id":null,"html_url":"https://github.com/metrumresearchgroup/mrgsolve","commit_stats":{"total_commits":2384,"total_committers":8,"mean_commits":298.0,"dds":0.07802013422818788,"last_synced_commit":"3624f2f5493641e4d5af9138dfe2c88a9aeb8f0f"},"previous_names":[],"tags_count":86,"template":false,"template_full_name":null,"purl":"pkg:github/metrumresearchgroup/mrgsolve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrumresearchgroup%2Fmrgsolve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrumresearchgroup%2Fmrgsolve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrumresearchgroup%2Fmrgsolve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrumresearchgroup%2Fmrgsolve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metrumresearchgroup","download_url":"https://codeload.github.com/metrumresearchgroup/mrgsolve/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrumresearchgroup%2Fmrgsolve/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32158346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T17:06:48.269Z","status":"ssl_error","status_checked_at":"2026-04-22T17:06:19.037Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mrgsolve","ode","r","rstats"],"created_at":"2024-08-13T07:05:07.074Z","updated_at":"2026-04-22T23:00:51.206Z","avatar_url":"https://github.com/metrumresearchgroup.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\npagetitle: \"mrgsolve\"\ndate: \"\"\nauthor: \"\"\noutput: github_document\n---\n\n\n```{r,echo=FALSE}\nlibrary(lattice)\nlibrary(knitr)\n```\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  comment = \".\",\n  fig.path = \"man/figures/README-\"\n)\noptions(tibble.print_min = 5, tibble.print_max = 5)\n```\n\n\n\n# mrgsolve \u003cimg align=\"right\" src = \"man/figures/MRG-Solve-Hex.png\" width=\"135px\"\u003e\n\n[![Build Status](https://github.com/metrumresearchgroup/mrgsolve/actions/workflows/main.yaml/badge.svg)](https://github.com/metrumresearchgroup/mrgsolve/actions/workflows/main.yaml)\n[![CRAN](http://www.r-pkg.org/badges/version/mrgsolve)](https://cran.r-project.org/package=mrgsolve)\n[![License](http://img.shields.io/badge/license-GPL%20%28%3E=%202%29-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)\n[![questions](https://img.shields.io/badge/ask_for-Help-brightgreen.svg)](https://github.com/metrumresearchgroup/mrgsolve/issues)\n[![MetrumRG](https://img.shields.io/badge/contact-MetrumRG-brightgreen.svg)](http://metrumrg.com)\n\n\n\nmrgsolve is an R package for simulation from hierarchical, ordinary differential\nequation (ODE) based models typically employed in drug development.  mrgsolve\nis free and open-source software.  \n\n\n## Resources\nPlease see [mrgsolve.github.io](https://mrgsolve.github.io) for additional\nresources, including:\n\n- [User Guide](https://mrgsolve.github.io/user_guide)\n- [R Documentation](https://mrgsolve.github.io/docs)\n- [Vignettes](https://mrgsolve.github.io/vignettes) \n- [Gallery](https://github.com/mrgsolve/gallery) \n\n\n## Installation\n\nInstall the latest release on CRAN\n```{r,eval=FALSE}\ninstall.packages(\"mrgsolve\")\n```\n\n__Please__ be sure to see important install-related information \n[here](https://github.com/metrumresearchgroup/mrgsolve/wiki/mrgsolve-Installation).\n\n\nInstall the current development version\n\n```{r,eval=FALSE}\nremotes::install_github(\"metrumresearchgroup/mrgsolve\")\n```\n\n## Interaction\n\nWe welcome __questions__ about anything mrgsolve: installation, getting your \nmodel to work, understanding better how mrgsolve works. We also welcome __suggestions__ \nfor how to make mrgsolve more useful to you and to the pharmacometrics community. \n\nPlease interact with us at the [Issue Tracker](https://github.com/metrumresearchgroup/mrgsolve/issues). \nThis requires a GitHub account. \n\n\n## Some examples\n\n### A simple simulation\n```{r,echo=FALSE}\noptions(mrgsolve_mread_quiet = TRUE)\n```\n\n\n```{r,message=FALSE}\nlibrary(mrgsolve)\n```\n\nLoad a model from the internal library\n```{r}\nmod \u003c- mread(\"pk1\", modlib())\n```\n\nSimulate a simple regimen\n```{r,pk-figure}\nmod %\u003e% \n  ev(amt = 100, ii = 24, addl = 9) %\u003e%\n  mrgsim(end = 300, delta = 0.1) %\u003e% \n  plot(CP~time)\n```\n\n\nA more complicated regimen: 100 mg infusions over 2 hours every 24 hours\nfor one week, followed by 50 mg boluses every 12 hours for 10 days:\n\n```{r,regimen-figure}\nmod %\u003e% \n  ev_rx(\"100 over 2h q 24 x 7 then 50 q 12 x 20\") %\u003e%\n  mrgsim(end = 600, delta = 0.1) %\u003e% \n  plot(CP~time)\n```\n\n\n### Population simulation\n\n```{r}\nmod \u003c- mread(\"popex\", modlib()) %\u003e% zero_re()\n```\n\n\nA data set looking at different patient weights and doses\n\n```{r, message=FALSE}\nlibrary(dplyr)\n\ndata \u003c- expand.ev(amt = c(100,150), WT = seq(40,140,20)) %\u003e% mutate(dose = amt)\n\nhead(data)\n```\n\nSimulate\n```{r, population-figure}\nmod %\u003e% \n  data_set(data) %\u003e% \n  carry_out(dose,WT) %\u003e%\n  mrgsim(delta = 0.1, end = 72) %\u003e% \n  plot(IPRED~time|factor(dose),scales = \"same\")\n```\n\n\n### Sensitivity analysis with PBPK model\n\n```{r}\nmod \u003c- modlib(\"pbpk\")\n```\n\nReference\n\n```{r, comment = \" \", echo=FALSE}\nblocks(mod,PROB) \n```\n\nModel parameters\n\n```{r}\nparam(mod)\n```\n\n\nSet up a  batch to simulate\n```{r}\nidata \u003c- expand.idata(Kpli = seq(4,20,2))\n\nidata\n```\n\n\n```{r, pbpk-figure}\nmod %\u003e% \n  ev(amt = 150) %\u003e% \n  idata_set(idata) %\u003e%\n  mrgsim(end = 6, delta = 0.1) %\u003e%\n  plot(Cp~time)\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrumresearchgroup%2Fmrgsolve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetrumresearchgroup%2Fmrgsolve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrumresearchgroup%2Fmrgsolve/lists"}