diff --git a/articles/estimating.html b/articles/estimating.html index 3551d66..49104e7 100644 --- a/articles/estimating.html +++ b/articles/estimating.html @@ -96,20 +96,6 @@

Introduction to nlmixr2targets
-

Model modifications to use nlmixr2targets -

-

When running a model with nlmixr2targets, it must be -interpretable by the targets package. The only notable -issue comes from setting initial conditions for a compartment, such as -using pd(0) <- initialConc. The reason this doesn’t work -is the targets package does not allow the assignment into -zero. So, for any initial conditions, you will need to set them with -initial instead of 0. The example above would -be pd(initial) <- initialConc, and -nlmixr2targets will convert it to the model -nlmixr2 expects for you.

-
-

Running one model with one dataset (tar_nlmixr())

The tar_nlmixr() function allows you to estimate one diff --git a/pkgdown.yml b/pkgdown.yml index 85b2afc..0299d08 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.0.7 pkgdown_sha: ~ articles: estimating: estimating.html -last_built: 2024-03-08T19:54Z +last_built: 2024-03-09T20:25Z urls: reference: https://nlmixr2.github.io/nlmixr2targets/reference article: https://nlmixr2.github.io/nlmixr2targets/articles diff --git a/reference/tar_nlmixr.html b/reference/tar_nlmixr.html index d69850d..54a1298 100644 --- a/reference/tar_nlmixr.html +++ b/reference/tar_nlmixr.html @@ -69,7 +69,8 @@

Usage data, est = NULL, control = list(), - table = nlmixr2est::tableControl() + table = nlmixr2est::tableControl(), + env = parent.frame() ) tar_nlmixr_raw( @@ -80,7 +81,8 @@

Usage control, table, object_simple_name, - data_simple_name + data_simple_name, + env )

@@ -127,6 +129,11 @@

ArgumentsUsage est, control = list(), table = nlmixr2est::tableControl(), - envir = parent.frame() + env = parent.frame() ) @@ -105,9 +105,9 @@

Arguments diff --git a/search.json b/search.json index dec2657..8dfab9b 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/ code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https:// www.contributor-covenant.org/translations.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to nlmixrtargets","title":"Contributing to nlmixrtargets","text":"outlines propose change nlmixrtargets. detailed info contributing , tidyverse packages, please see development contributing guide.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to nlmixrtargets","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to nlmixrtargets","text":"want make bigger change, ’s good idea first file issue make sure someone team agrees ’s needed. ’ve found bug, please file issue illustrates bug minimal reprex (also help write unit test, needed).","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to nlmixrtargets","text":"Fork package clone onto computer. haven’t done , recommend using usethis::create_from_github(\"nlmixrdevelopment/nlmixrtargets\", fork = TRUE). Install development dependences devtools::install_dev_deps(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). recommend using usethis::pr_init(\"brief-description--change\"). Make changes, commit git, create PR running usethis::pr_push(), following prompts browser. title PR briefly describe change. body PR contain Fixes #issue-number. user-facing changes, add bullet top NEWS.md (.e. just first header). Follow style described https://style.tidyverse.org/news.html.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"Bigger changes","what":"Code style","title":"Contributing to nlmixrtargets","text":"New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. use testthat unit tests. Contributions test cases included easier accept.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to nlmixrtargets","text":"Please note nlmixrtargets project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 2, June 1991Copyright © 1989, 1991 Free Software Foundation, Inc.,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"licenses software designed take away freedom share change . contrast, GNU General Public License intended guarantee freedom share change free software–make sure software free users. General Public License applies Free Software Foundation’s software program whose authors commit using . (Free Software Foundation software covered GNU Lesser General Public License instead.) can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge service wish), receive source code can get want , can change software use pieces new free programs; know can things. protect rights, need make restrictions forbid anyone deny rights ask surrender rights. restrictions translate certain responsibilities distribute copies software, modify . example, distribute copies program, whether gratis fee, must give recipients rights . must make sure , , receive can get source code. must show terms know rights. protect rights two steps: (1) copyright software, (2) offer license gives legal permission copy, distribute /modify software. Also, author’s protection , want make certain everyone understands warranty free software. software modified someone else passed , want recipients know original, problems introduced others reflect original authors’ reputations. Finally, free program threatened constantly software patents. wish avoid danger redistributors free program individually obtain patent licenses, effect making program proprietary. prevent , made clear patent must licensed everyone’s free use licensed . precise terms conditions copying, distribution modification follow.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/LICENSE.html","id":"terms-and-conditions-for-copying-distribution-and-modification","dir":"","previous_headings":"","what":"TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION","title":"GNU General Public License","text":"0. License applies program work contains notice placed copyright holder saying may distributed terms General Public License. “Program”, , refers program work, “work based Program” means either Program derivative work copyright law: say, work containing Program portion , either verbatim modifications /translated another language. (Hereinafter, translation included without limitation term “modification”.) licensee addressed “”. Activities copying, distribution modification covered License; outside scope. act running Program restricted, output Program covered contents constitute work based Program (independent made running Program). Whether true depends Program . 1. may copy distribute verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice disclaimer warranty; keep intact notices refer License absence warranty; give recipients Program copy License along Program. may charge fee physical act transferring copy, may option offer warranty protection exchange fee. 2. may modify copy copies Program portion , thus forming work based Program, copy distribute modifications work terms Section 1 , provided also meet conditions: ) must cause modified files carry prominent notices stating changed files date change. b) must cause work distribute publish, whole part contains derived Program part thereof, licensed whole charge third parties terms License. c) modified program normally reads commands interactively run, must cause , started running interactive use ordinary way, print display announcement including appropriate copyright notice notice warranty (else, saying provide warranty) users may redistribute program conditions, telling user view copy License. (Exception: Program interactive normally print announcement, work based Program required print announcement.) requirements apply modified work whole. identifiable sections work derived Program, can reasonably considered independent separate works , License, terms, apply sections distribute separate works. distribute sections part whole work based Program, distribution whole must terms License, whose permissions licensees extend entire whole, thus every part regardless wrote . Thus, intent section claim rights contest rights work written entirely ; rather, intent exercise right control distribution derivative collective works based Program. addition, mere aggregation another work based Program Program (work based Program) volume storage distribution medium bring work scope License. 3. may copy distribute Program (work based , Section 2) object code executable form terms Sections 1 2 provided also one following: ) Accompany complete corresponding machine-readable source code, must distributed terms Sections 1 2 medium customarily used software interchange; , b) Accompany written offer, valid least three years, give third party, charge cost physically performing source distribution, complete machine-readable copy corresponding source code, distributed terms Sections 1 2 medium customarily used software interchange; , c) Accompany information received offer distribute corresponding source code. (alternative allowed noncommercial distribution received program object code executable form offer, accord Subsection b .) source code work means preferred form work making modifications . executable work, complete source code means source code modules contains, plus associated interface definition files, plus scripts used control compilation installation executable. However, special exception, source code distributed need include anything normally distributed (either source binary form) major components (compiler, kernel, ) operating system executable runs, unless component accompanies executable. distribution executable object code made offering access copy designated place, offering equivalent access copy source code place counts distribution source code, even though third parties compelled copy source along object code. 4. may copy, modify, sublicense, distribute Program except expressly provided License. attempt otherwise copy, modify, sublicense distribute Program void, automatically terminate rights License. However, parties received copies, rights, License licenses terminated long parties remain full compliance. 5. required accept License, since signed . However, nothing else grants permission modify distribute Program derivative works. actions prohibited law accept License. Therefore, modifying distributing Program (work based Program), indicate acceptance License , terms conditions copying, distributing modifying Program works based . 6. time redistribute Program (work based Program), recipient automatically receives license original licensor copy, distribute modify Program subject terms conditions. may impose restrictions recipients’ exercise rights granted herein. responsible enforcing compliance third parties License. 7. , consequence court judgment allegation patent infringement reason (limited patent issues), conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. distribute satisfy simultaneously obligations License pertinent obligations, consequence may distribute Program . example, patent license permit royalty-free redistribution Program receive copies directly indirectly , way satisfy License refrain entirely distribution Program. portion section held invalid unenforceable particular circumstance, balance section intended apply section whole intended apply circumstances. purpose section induce infringe patents property right claims contest validity claims; section sole purpose protecting integrity free software distribution system, implemented public license practices. Many people made generous contributions wide range software distributed system reliance consistent application system; author/donor decide willing distribute software system licensee impose choice. section intended make thoroughly clear believed consequence rest License. 8. distribution /use Program restricted certain countries either patents copyrighted interfaces, original copyright holder places Program License may add explicit geographical distribution limitation excluding countries, distribution permitted among countries thus excluded. case, License incorporates limitation written body License. 9. Free Software Foundation may publish revised /new versions General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies version number License applies “later version”, option following terms conditions either version later version published Free Software Foundation. Program specify version number License, may choose version ever published Free Software Foundation. 10. wish incorporate parts Program free programs whose distribution conditions different, write author ask permission. software copyrighted Free Software Foundation, write Free Software Foundation; sometimes make exceptions . decision guided two goals preserving free status derivatives free software promoting sharing reuse software generally.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/LICENSE.html","id":"no-warranty","dir":"","previous_headings":"","what":"NO WARRANTY","title":"GNU General Public License","text":"11. PROGRAM LICENSED FREE CHARGE, WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION. 12. EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MAY MODIFY /REDISTRIBUTE PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES. END TERMS CONDITIONS","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively convey exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program interactive, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, commands use may called something show w show c; even mouse-clicks menu items–whatever suits program. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. sample; alter names: General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License.","code":" Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice"},{"path":"https://nlmixr2.github.io/nlmixr2targets/articles/estimating.html","id":"introduction-to-nlmixr2targets","dir":"Articles","previous_headings":"","what":"Introduction to nlmixr2targets","title":"Estimating nlmixr2 models with 'nlmixr2targets'","text":"nlmixr2targets improves reproducibility ensuring model --date data, speeds workflow using targets package run models model data changed. two main functions used within package: tar_nlmixr() runs single model, tar_nlmixr_multimodel() runs multiple models single dataset. Using nlmixr2targets requires use targets package. learn targets package, see (https://docs.ropensci.org/targets/)[targets website].","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/articles/estimating.html","id":"model-modifications-to-use-nlmixr2targets","dir":"Articles","previous_headings":"","what":"Model modifications to use nlmixr2targets","title":"Estimating nlmixr2 models with 'nlmixr2targets'","text":"running model nlmixr2targets, must interpretable targets package. notable issue comes setting initial conditions compartment, using pd(0) <- initialConc. reason doesn’t work targets package allow assignment zero. , initial conditions, need set initial instead 0. example pd(initial) <- initialConc, nlmixr2targets convert model nlmixr2 expects .","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/articles/estimating.html","id":"running-one-model-with-one-dataset-tar_nlmixr","dir":"Articles","previous_headings":"","what":"Running one model with one dataset (tar_nlmixr())","title":"Estimating nlmixr2 models with 'nlmixr2targets'","text":"tar_nlmixr() function allows estimate one model one dataset. generate three targets: simplified version model, minimal version dataset, estimation step. simplified version model removes parts less reproducible changes none model intent. (Advanced information: parts removed source references model name. Also, model modified step setting initial values described previous section vignette.)","code":"library(targets) library(tarchetypes) library(nlmixr2targets) pheno <- function() { ini({ lcl <- log(0.008); label(\"Typical value of clearance\") lvc <- log(0.6); label(\"Typical value of volume of distribution\") etalcl + etalvc ~ c(1, 0.01, 1) cpaddSd <- 0.1; label(\"residual variability\") }) model({ cl <- exp(lcl + etalcl) vc <- exp(lvc + etalvc) kel <- cl/vc d/dt(central) <- -kel*central cp <- central/vc cp ~ add(cpaddSd) }) } plan_model <- tar_plan( myData = nlmixr2data::pheno_sd, tar_nlmixr( model_pheno, object = pheno, data = myData, est = \"saem\" ) ) list( plan_model )"},{"path":"https://nlmixr2.github.io/nlmixr2targets/articles/estimating.html","id":"running-multiple-models-with-one-dataset-tar_nlmixr_multimodel","dir":"Articles","previous_headings":"","what":"Running multiple models with one dataset (tar_nlmixr_multimodel())","title":"Estimating nlmixr2 models with 'nlmixr2targets'","text":"common use case generate multiple models using single dataset estimation method. tar_nlmixr_multimodel() allows generation named list models allow subsequent analysis models. Internally, tar_nlmixr_multimodel() passes models tar_nlmixr() data set simplification equivalent steps run per model, model run often required dataset model changes.","code":"library(targets) library(tarchetypes) library(nlmixr2targets) pheno <- function() { ini({ lcl <- log(0.008); label(\"Typical value of clearance\") lvc <- log(0.6); label(\"Typical value of volume of distribution\") etalcl + etalvc ~ c(1, 0.01, 1) cpaddSd <- 0.1; label(\"residual variability\") }) model({ cl <- exp(lcl + etalcl) vc <- exp(lvc + etalvc) kel <- cl/vc d/dt(central) <- -kel*central cp <- central/vc cp ~ add(cpaddSd) }) } pheno2 <- function() { ini({ lcl <- log(0.008); label(\"Typical value of clearance\") lvc <- log(0.6); label(\"Typical value of volume of distribution\") etalcl + etalvc ~ c(2, 0.01, 2) cpaddSd <- 3.0; label(\"residual variability\") }) model({ cl <- exp(lcl + etalcl) vc <- exp(lvc + etalvc) kel <- cl/vc d/dt(central) <- -kel*central cp <- central/vc cp ~ add(cpaddSd) }) } plan_model <- tar_nlmixr_multimodel( all_models, data = nlmixr2data::pheno_sd, est = \"saem\", \"Base model; additive residual error = 1\" = pheno, \"Base model; additive residual error = 3\" = pheno2 ) plan_report <- tar_plan( # Determine the AIC for all tested models aic_list = sapply(X = all_models, FUN = AIC) ) list( plan_model, plan_report )"},{"path":"https://nlmixr2.github.io/nlmixr2targets/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Bill Denney. Author, maintainer.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Denney B (2024). nlmixr2targets: Targets 'nlmixr2' Pipelines. R package version 0.0.0.9000, https://nlmixr2.github.io/nlmixr2targets/.","code":"@Manual{, title = {nlmixr2targets: Targets for 'nlmixr2' Pipelines}, author = {Bill Denney}, year = {2024}, note = {R package version 0.0.0.9000}, url = {https://nlmixr2.github.io/nlmixr2targets/}, }"},{"path":"https://nlmixr2.github.io/nlmixr2targets/index.html","id":"nlmixr2targets","dir":"","previous_headings":"","what":"Targets for nlmixr2 Pipelines","title":"Targets for nlmixr2 Pipelines","text":"goal nlmixr2targets simplify use nlmixr2 package targets package. nlmixr2targets part targetopeia.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Targets for nlmixr2 Pipelines","text":"available CRAN, can install released version nlmixr2targets CRAN : development version GitHub :","code":"install.packages(\"nlmixr2targets\") # install.packages(\"devtools\") devtools::install_github(\"nlmixr2/nlmixr2targets\")"},{"path":"https://nlmixr2.github.io/nlmixr2targets/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Targets for nlmixr2 Pipelines","text":"basic example shows solve common problem:","code":"library(targets) targets::tar_script({ library(nlmixr2targets) pheno <- function() { ini({ tcl <- log(0.008) # typical value of clearance tv <- log(0.6) # typical value of volume ## var(eta.cl) eta.cl + eta.v ~ c(1, 0.01, 1) ## cov(eta.cl, eta.v), var(eta.v) # interindividual variability on clearance and volume add.err <- 0.1 # residual variability }) model({ cl <- exp(tcl + eta.cl) # individual value of clearance v <- exp(tv + eta.v) # individual value of volume ke <- cl / v # elimination rate constant d/dt(A1) = - ke * A1 # model differential equation cp = A1 / v # concentration in plasma cp ~ add(add.err) # define error model }) } list( tar_nlmixr(name=pheno_model, object=pheno, data=nlmixr2data::pheno_sd, est=\"saem\") ) }) targets::tar_make()"},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_data_simplify.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardize and simplify data for nlmixr2 estimation — nlmixr_data_simplify","title":"Standardize and simplify data for nlmixr2 estimation — nlmixr_data_simplify","text":"function typically needed end users.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_data_simplify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardize and simplify data for nlmixr2 estimation — nlmixr_data_simplify","text":"","code":"nlmixr_data_simplify(data, object, table = list())"},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_data_simplify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardize and simplify data for nlmixr2 estimation — nlmixr_data_simplify","text":"data nlmixr data object nlmixr_ui object (e.g. output running nlmixr(object = model) table output table control object (like `tableControl()`)","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_data_simplify.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardize and simplify data for nlmixr2 estimation — nlmixr_data_simplify","text":"data nlmixr2 column lower case left covariate columns right alphabetically sorted.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_data_simplify.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standardize and simplify data for nlmixr2 estimation — nlmixr_data_simplify","text":"standardization keeps columns rxode2 nlmixr2 use along covariates. Column order standardized (rxode2 nlmixr2 alphabetically sorted covariates), rxode2 nlmixr2 column names converted lower case.","code":""},{"path":[]},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_object_simplify.html","id":null,"dir":"Reference","previous_headings":"","what":"Simplify an nlmixr object — nlmixr_object_simplify","title":"Simplify an nlmixr object — nlmixr_object_simplify","text":"function typically needed end users.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_object_simplify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simplify an nlmixr object — nlmixr_object_simplify","text":"","code":"nlmixr_object_simplify(object)"},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_object_simplify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simplify an nlmixr object — nlmixr_object_simplify","text":"object Fitted object function specifying model.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_object_simplify.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simplify an nlmixr object — nlmixr_object_simplify","text":"object converted nlmixrui object. model name always \"object\".","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_object_simplify.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simplify an nlmixr object — nlmixr_object_simplify","text":"object simplification removes comments (please use label() instead comments label parameters) converts object \"nlmixrui\" object. Since setting initial conditions cmt(0) work targets, function definition object must set cmt(initial). cmt(initial) converted cmt(0) passing nlmixr2.","code":""},{"path":[]},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate a set of targets for nlmixr estimation — tar_nlmixr","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"targets generated include name final estimation step, paste(name, \"object_simple\", sep = \"_tar_\") (e.g. \"pheno_tar_object_simple\") simplified model object, paste(name, \"data_simple\", sep = \"_tar_\") (e.g. \"pheno_tar_data_simple\") simplified data object.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"","code":"tar_nlmixr( name, object, data, est = NULL, control = list(), table = nlmixr2est::tableControl() ) tar_nlmixr_raw( name, object, data, est, control, table, object_simple_name, data_simple_name )"},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. object Fitted object function specifying model. data nlmixr data est estimation method (methods shown `nlmixr2AllEst()`). Methods can added tools control estimation control object. expected different type estimation method table output table control object (like `tableControl()`) object_simple_name, data_simple_name target names use object data","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"list targets model simplification, data simplification, model estimation.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"way objects simplified, see nlmixr_object_simplify() nlmixr_data_simplify(). see write initial conditions work targets, see nlmixr_object_simplify().","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"tar_nlmixr_raw(): internal function generate targets","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"","code":"if (FALSE) { library(targets) targets::tar_script({ pheno <- function() { ini({ lcl <- log(0.008); label(\"Typical value of clearance\") lvc <- log(0.6); label(\"Typical value of volume of distribution\") etalcl + etalvc ~ c(1, 0.01, 1) cpaddSd <- 0.1; label(\"residual variability\") }) model({ cl <- exp(lcl + etalcl) vc <- exp(lvc + etalvc) kel <- cl/vc d/dt(central) <- -kel*central cp <- central/vc cp ~ add(cpaddSd) }) } list( tar_nlmixr( name = pheno_model, object = pheno, data = nlmixr2data::pheno_sd, est = \"saem\" ) ) }) targets::tar_make() }"},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr_multimodel.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate a list of models based on a single dataset and estimation method — tar_nlmixr_multimodel","title":"Generate a list of models based on a single dataset and estimation method — tar_nlmixr_multimodel","text":"Generate list models based single dataset estimation method","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr_multimodel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate a list of models based on a single dataset and estimation method — tar_nlmixr_multimodel","text":"","code":"tar_nlmixr_multimodel( name, ..., data, est, control = list(), table = nlmixr2est::tableControl(), envir = parent.frame() )"},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr_multimodel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate a list of models based on a single dataset and estimation method — tar_nlmixr_multimodel","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. ... Named arguments format \"Model description\" = modelFunction data nlmixr data est estimation method (methods shown `nlmixr2AllEst()`). Methods can added tools control estimation control object. expected different type estimation method table output table control object (like `tableControl()`) envir environment models defined (usually need modified)","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr_multimodel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate a list of models based on a single dataset and estimation method — tar_nlmixr_multimodel","text":"list targets model simplification, data simplification, model estimation.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/news/index.html","id":"nlmixr2targets-0009000","dir":"Changelog","previous_headings":"","what":"nlmixr2targets 0.0.0.9000","title":"nlmixr2targets 0.0.0.9000","text":"Setting initial conditions can now done cmt(initial) automatically recoded cmt(0). Added “cens” “limit” columns nlmixr2 columns Keep columns table argument’s keep element","code":""}] +[{"path":[]},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement [INSERT CONTACT METHOD]. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/ code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https:// www.contributor-covenant.org/translations.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to nlmixrtargets","title":"Contributing to nlmixrtargets","text":"outlines propose change nlmixrtargets. detailed info contributing , tidyverse packages, please see development contributing guide.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to nlmixrtargets","text":"can fix typos, spelling mistakes, grammatical errors documentation directly using GitHub web interface, long changes made source file. generally means ’ll need edit roxygen2 comments .R, .Rd file. can find .R file generates .Rd reading comment first line.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CONTRIBUTING.html","id":"bigger-changes","dir":"","previous_headings":"","what":"Bigger changes","title":"Contributing to nlmixrtargets","text":"want make bigger change, ’s good idea first file issue make sure someone team agrees ’s needed. ’ve found bug, please file issue illustrates bug minimal reprex (also help write unit test, needed).","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"Bigger changes","what":"Pull request process","title":"Contributing to nlmixrtargets","text":"Fork package clone onto computer. haven’t done , recommend using usethis::create_from_github(\"nlmixrdevelopment/nlmixrtargets\", fork = TRUE). Install development dependences devtools::install_dev_deps(), make sure package passes R CMD check running devtools::check(). R CMD check doesn’t pass cleanly, ’s good idea ask help continuing. Create Git branch pull request (PR). recommend using usethis::pr_init(\"brief-description--change\"). Make changes, commit git, create PR running usethis::pr_push(), following prompts browser. title PR briefly describe change. body PR contain Fixes #issue-number. user-facing changes, add bullet top NEWS.md (.e. just first header). Follow style described https://style.tidyverse.org/news.html.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CONTRIBUTING.html","id":"code-style","dir":"","previous_headings":"Bigger changes","what":"Code style","title":"Contributing to nlmixrtargets","text":"New code follow tidyverse style guide. can use styler package apply styles, please don’t restyle code nothing PR. use roxygen2, Markdown syntax, documentation. use testthat unit tests. Contributions test cases included easier accept.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to nlmixrtargets","text":"Please note nlmixrtargets project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 2, June 1991Copyright © 1989, 1991 Free Software Foundation, Inc.,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"licenses software designed take away freedom share change . contrast, GNU General Public License intended guarantee freedom share change free software–make sure software free users. General Public License applies Free Software Foundation’s software program whose authors commit using . (Free Software Foundation software covered GNU Lesser General Public License instead.) can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge service wish), receive source code can get want , can change software use pieces new free programs; know can things. protect rights, need make restrictions forbid anyone deny rights ask surrender rights. restrictions translate certain responsibilities distribute copies software, modify . example, distribute copies program, whether gratis fee, must give recipients rights . must make sure , , receive can get source code. must show terms know rights. protect rights two steps: (1) copyright software, (2) offer license gives legal permission copy, distribute /modify software. Also, author’s protection , want make certain everyone understands warranty free software. software modified someone else passed , want recipients know original, problems introduced others reflect original authors’ reputations. Finally, free program threatened constantly software patents. wish avoid danger redistributors free program individually obtain patent licenses, effect making program proprietary. prevent , made clear patent must licensed everyone’s free use licensed . precise terms conditions copying, distribution modification follow.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/LICENSE.html","id":"terms-and-conditions-for-copying-distribution-and-modification","dir":"","previous_headings":"","what":"TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION","title":"GNU General Public License","text":"0. License applies program work contains notice placed copyright holder saying may distributed terms General Public License. “Program”, , refers program work, “work based Program” means either Program derivative work copyright law: say, work containing Program portion , either verbatim modifications /translated another language. (Hereinafter, translation included without limitation term “modification”.) licensee addressed “”. Activities copying, distribution modification covered License; outside scope. act running Program restricted, output Program covered contents constitute work based Program (independent made running Program). Whether true depends Program . 1. may copy distribute verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice disclaimer warranty; keep intact notices refer License absence warranty; give recipients Program copy License along Program. may charge fee physical act transferring copy, may option offer warranty protection exchange fee. 2. may modify copy copies Program portion , thus forming work based Program, copy distribute modifications work terms Section 1 , provided also meet conditions: ) must cause modified files carry prominent notices stating changed files date change. b) must cause work distribute publish, whole part contains derived Program part thereof, licensed whole charge third parties terms License. c) modified program normally reads commands interactively run, must cause , started running interactive use ordinary way, print display announcement including appropriate copyright notice notice warranty (else, saying provide warranty) users may redistribute program conditions, telling user view copy License. (Exception: Program interactive normally print announcement, work based Program required print announcement.) requirements apply modified work whole. identifiable sections work derived Program, can reasonably considered independent separate works , License, terms, apply sections distribute separate works. distribute sections part whole work based Program, distribution whole must terms License, whose permissions licensees extend entire whole, thus every part regardless wrote . Thus, intent section claim rights contest rights work written entirely ; rather, intent exercise right control distribution derivative collective works based Program. addition, mere aggregation another work based Program Program (work based Program) volume storage distribution medium bring work scope License. 3. may copy distribute Program (work based , Section 2) object code executable form terms Sections 1 2 provided also one following: ) Accompany complete corresponding machine-readable source code, must distributed terms Sections 1 2 medium customarily used software interchange; , b) Accompany written offer, valid least three years, give third party, charge cost physically performing source distribution, complete machine-readable copy corresponding source code, distributed terms Sections 1 2 medium customarily used software interchange; , c) Accompany information received offer distribute corresponding source code. (alternative allowed noncommercial distribution received program object code executable form offer, accord Subsection b .) source code work means preferred form work making modifications . executable work, complete source code means source code modules contains, plus associated interface definition files, plus scripts used control compilation installation executable. However, special exception, source code distributed need include anything normally distributed (either source binary form) major components (compiler, kernel, ) operating system executable runs, unless component accompanies executable. distribution executable object code made offering access copy designated place, offering equivalent access copy source code place counts distribution source code, even though third parties compelled copy source along object code. 4. may copy, modify, sublicense, distribute Program except expressly provided License. attempt otherwise copy, modify, sublicense distribute Program void, automatically terminate rights License. However, parties received copies, rights, License licenses terminated long parties remain full compliance. 5. required accept License, since signed . However, nothing else grants permission modify distribute Program derivative works. actions prohibited law accept License. Therefore, modifying distributing Program (work based Program), indicate acceptance License , terms conditions copying, distributing modifying Program works based . 6. time redistribute Program (work based Program), recipient automatically receives license original licensor copy, distribute modify Program subject terms conditions. may impose restrictions recipients’ exercise rights granted herein. responsible enforcing compliance third parties License. 7. , consequence court judgment allegation patent infringement reason (limited patent issues), conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. distribute satisfy simultaneously obligations License pertinent obligations, consequence may distribute Program . example, patent license permit royalty-free redistribution Program receive copies directly indirectly , way satisfy License refrain entirely distribution Program. portion section held invalid unenforceable particular circumstance, balance section intended apply section whole intended apply circumstances. purpose section induce infringe patents property right claims contest validity claims; section sole purpose protecting integrity free software distribution system, implemented public license practices. Many people made generous contributions wide range software distributed system reliance consistent application system; author/donor decide willing distribute software system licensee impose choice. section intended make thoroughly clear believed consequence rest License. 8. distribution /use Program restricted certain countries either patents copyrighted interfaces, original copyright holder places Program License may add explicit geographical distribution limitation excluding countries, distribution permitted among countries thus excluded. case, License incorporates limitation written body License. 9. Free Software Foundation may publish revised /new versions General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies version number License applies “later version”, option following terms conditions either version later version published Free Software Foundation. Program specify version number License, may choose version ever published Free Software Foundation. 10. wish incorporate parts Program free programs whose distribution conditions different, write author ask permission. software copyrighted Free Software Foundation, write Free Software Foundation; sometimes make exceptions . decision guided two goals preserving free status derivatives free software promoting sharing reuse software generally.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/LICENSE.html","id":"no-warranty","dir":"","previous_headings":"","what":"NO WARRANTY","title":"GNU General Public License","text":"11. PROGRAM LICENSED FREE CHARGE, WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION. 12. EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MAY MODIFY /REDISTRIBUTE PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES. END TERMS CONDITIONS","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively convey exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program interactive, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, commands use may called something show w show c; even mouse-clicks menu items–whatever suits program. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. sample; alter names: General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License.","code":" Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice"},{"path":"https://nlmixr2.github.io/nlmixr2targets/articles/estimating.html","id":"introduction-to-nlmixr2targets","dir":"Articles","previous_headings":"","what":"Introduction to nlmixr2targets","title":"Estimating nlmixr2 models with 'nlmixr2targets'","text":"nlmixr2targets improves reproducibility ensuring model --date data, speeds workflow using targets package run models model data changed. two main functions used within package: tar_nlmixr() runs single model, tar_nlmixr_multimodel() runs multiple models single dataset. Using nlmixr2targets requires use targets package. learn targets package, see (https://docs.ropensci.org/targets/)[targets website].","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/articles/estimating.html","id":"running-one-model-with-one-dataset-tar_nlmixr","dir":"Articles","previous_headings":"","what":"Running one model with one dataset (tar_nlmixr())","title":"Estimating nlmixr2 models with 'nlmixr2targets'","text":"tar_nlmixr() function allows estimate one model one dataset. generate three targets: simplified version model, minimal version dataset, estimation step. simplified version model removes parts less reproducible changes none model intent. (Advanced information: parts removed source references model name. Also, model modified step setting initial values described previous section vignette.)","code":"library(targets) library(tarchetypes) library(nlmixr2targets) pheno <- function() { ini({ lcl <- log(0.008); label(\"Typical value of clearance\") lvc <- log(0.6); label(\"Typical value of volume of distribution\") etalcl + etalvc ~ c(1, 0.01, 1) cpaddSd <- 0.1; label(\"residual variability\") }) model({ cl <- exp(lcl + etalcl) vc <- exp(lvc + etalvc) kel <- cl/vc d/dt(central) <- -kel*central cp <- central/vc cp ~ add(cpaddSd) }) } plan_model <- tar_plan( myData = nlmixr2data::pheno_sd, tar_nlmixr( model_pheno, object = pheno, data = myData, est = \"saem\" ) ) list( plan_model )"},{"path":"https://nlmixr2.github.io/nlmixr2targets/articles/estimating.html","id":"running-multiple-models-with-one-dataset-tar_nlmixr_multimodel","dir":"Articles","previous_headings":"","what":"Running multiple models with one dataset (tar_nlmixr_multimodel())","title":"Estimating nlmixr2 models with 'nlmixr2targets'","text":"common use case generate multiple models using single dataset estimation method. tar_nlmixr_multimodel() allows generation named list models allow subsequent analysis models. Internally, tar_nlmixr_multimodel() passes models tar_nlmixr() data set simplification equivalent steps run per model, model run often required dataset model changes.","code":"library(targets) library(tarchetypes) library(nlmixr2targets) pheno <- function() { ini({ lcl <- log(0.008); label(\"Typical value of clearance\") lvc <- log(0.6); label(\"Typical value of volume of distribution\") etalcl + etalvc ~ c(1, 0.01, 1) cpaddSd <- 0.1; label(\"residual variability\") }) model({ cl <- exp(lcl + etalcl) vc <- exp(lvc + etalvc) kel <- cl/vc d/dt(central) <- -kel*central cp <- central/vc cp ~ add(cpaddSd) }) } pheno2 <- function() { ini({ lcl <- log(0.008); label(\"Typical value of clearance\") lvc <- log(0.6); label(\"Typical value of volume of distribution\") etalcl + etalvc ~ c(2, 0.01, 2) cpaddSd <- 3.0; label(\"residual variability\") }) model({ cl <- exp(lcl + etalcl) vc <- exp(lvc + etalvc) kel <- cl/vc d/dt(central) <- -kel*central cp <- central/vc cp ~ add(cpaddSd) }) } plan_model <- tar_nlmixr_multimodel( all_models, data = nlmixr2data::pheno_sd, est = \"saem\", \"Base model; additive residual error = 1\" = pheno, \"Base model; additive residual error = 3\" = pheno2 ) plan_report <- tar_plan( # Determine the AIC for all tested models aic_list = sapply(X = all_models, FUN = AIC) ) list( plan_model, plan_report )"},{"path":"https://nlmixr2.github.io/nlmixr2targets/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Bill Denney. Author, maintainer.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Denney B (2024). nlmixr2targets: Targets 'nlmixr2' Pipelines. R package version 0.0.0.9000, https://nlmixr2.github.io/nlmixr2targets/.","code":"@Manual{, title = {nlmixr2targets: Targets for 'nlmixr2' Pipelines}, author = {Bill Denney}, year = {2024}, note = {R package version 0.0.0.9000}, url = {https://nlmixr2.github.io/nlmixr2targets/}, }"},{"path":"https://nlmixr2.github.io/nlmixr2targets/index.html","id":"nlmixr2targets","dir":"","previous_headings":"","what":"Targets for nlmixr2 Pipelines","title":"Targets for nlmixr2 Pipelines","text":"goal nlmixr2targets simplify use nlmixr2 package targets package. nlmixr2targets part targetopeia.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Targets for nlmixr2 Pipelines","text":"available CRAN, can install released version nlmixr2targets CRAN : development version GitHub :","code":"install.packages(\"nlmixr2targets\") # install.packages(\"devtools\") devtools::install_github(\"nlmixr2/nlmixr2targets\")"},{"path":"https://nlmixr2.github.io/nlmixr2targets/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Targets for nlmixr2 Pipelines","text":"basic example shows solve common problem:","code":"library(targets) targets::tar_script({ library(nlmixr2targets) pheno <- function() { ini({ tcl <- log(0.008) # typical value of clearance tv <- log(0.6) # typical value of volume ## var(eta.cl) eta.cl + eta.v ~ c(1, 0.01, 1) ## cov(eta.cl, eta.v), var(eta.v) # interindividual variability on clearance and volume add.err <- 0.1 # residual variability }) model({ cl <- exp(tcl + eta.cl) # individual value of clearance v <- exp(tv + eta.v) # individual value of volume ke <- cl / v # elimination rate constant d/dt(A1) = - ke * A1 # model differential equation cp = A1 / v # concentration in plasma cp ~ add(add.err) # define error model }) } list( tar_nlmixr(name=pheno_model, object=pheno, data=nlmixr2data::pheno_sd, est=\"saem\") ) }) targets::tar_make()"},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_data_simplify.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardize and simplify data for nlmixr2 estimation — nlmixr_data_simplify","title":"Standardize and simplify data for nlmixr2 estimation — nlmixr_data_simplify","text":"function typically needed end users.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_data_simplify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardize and simplify data for nlmixr2 estimation — nlmixr_data_simplify","text":"","code":"nlmixr_data_simplify(data, object, table = list())"},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_data_simplify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardize and simplify data for nlmixr2 estimation — nlmixr_data_simplify","text":"data nlmixr data object nlmixr_ui object (e.g. output running nlmixr(object = model) table output table control object (like `tableControl()`)","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_data_simplify.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardize and simplify data for nlmixr2 estimation — nlmixr_data_simplify","text":"data nlmixr2 column lower case left covariate columns right alphabetically sorted.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_data_simplify.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standardize and simplify data for nlmixr2 estimation — nlmixr_data_simplify","text":"standardization keeps columns rxode2 nlmixr2 use along covariates. Column order standardized (rxode2 nlmixr2 alphabetically sorted covariates), rxode2 nlmixr2 column names converted lower case.","code":""},{"path":[]},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_object_simplify.html","id":null,"dir":"Reference","previous_headings":"","what":"Simplify an nlmixr object — nlmixr_object_simplify","title":"Simplify an nlmixr object — nlmixr_object_simplify","text":"function typically needed end users.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_object_simplify.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simplify an nlmixr object — nlmixr_object_simplify","text":"","code":"nlmixr_object_simplify(object)"},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_object_simplify.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simplify an nlmixr object — nlmixr_object_simplify","text":"object Fitted object function specifying model.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_object_simplify.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simplify an nlmixr object — nlmixr_object_simplify","text":"object converted nlmixrui object. model name always \"object\".","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/nlmixr_object_simplify.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simplify an nlmixr object — nlmixr_object_simplify","text":"object simplification removes comments (please use label() instead comments label parameters) converts object \"nlmixrui\" object. Since setting initial conditions cmt(0) work targets, function definition object must set cmt(initial). cmt(initial) converted cmt(0) passing nlmixr2.","code":""},{"path":[]},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate a set of targets for nlmixr estimation — tar_nlmixr","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"targets generated include name final estimation step, paste(name, \"object_simple\", sep = \"_tar_\") (e.g. \"pheno_tar_object_simple\") simplified model object, paste(name, \"data_simple\", sep = \"_tar_\") (e.g. \"pheno_tar_data_simple\") simplified data object.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"","code":"tar_nlmixr( name, object, data, est = NULL, control = list(), table = nlmixr2est::tableControl(), env = parent.frame() ) tar_nlmixr_raw( name, object, data, est, control, table, object_simple_name, data_simple_name, env )"},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. object Fitted object function specifying model. data nlmixr data est estimation method (methods shown `nlmixr2AllEst()`). Methods can added tools control estimation control object. expected different type estimation method table output table control object (like `tableControl()`) env environment model setup (needed typical use) object_simple_name, data_simple_name target names use object data","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"list targets model simplification, data simplification, model estimation.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"way objects simplified, see nlmixr_object_simplify() nlmixr_data_simplify(). see write initial conditions work targets, see nlmixr_object_simplify().","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":"functions","dir":"Reference","previous_headings":"","what":"Functions","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"tar_nlmixr_raw(): internal function generate targets","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate a set of targets for nlmixr estimation — tar_nlmixr","text":"","code":"if (FALSE) { library(targets) targets::tar_script({ pheno <- function() { ini({ lcl <- log(0.008); label(\"Typical value of clearance\") lvc <- log(0.6); label(\"Typical value of volume of distribution\") etalcl + etalvc ~ c(1, 0.01, 1) cpaddSd <- 0.1; label(\"residual variability\") }) model({ cl <- exp(lcl + etalcl) vc <- exp(lvc + etalvc) kel <- cl/vc d/dt(central) <- -kel*central cp <- central/vc cp ~ add(cpaddSd) }) } list( tar_nlmixr( name = pheno_model, object = pheno, data = nlmixr2data::pheno_sd, est = \"saem\" ) ) }) targets::tar_make() }"},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr_multimodel.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate a list of models based on a single dataset and estimation method — tar_nlmixr_multimodel","title":"Generate a list of models based on a single dataset and estimation method — tar_nlmixr_multimodel","text":"Generate list models based single dataset estimation method","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr_multimodel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate a list of models based on a single dataset and estimation method — tar_nlmixr_multimodel","text":"","code":"tar_nlmixr_multimodel( name, ..., data, est, control = list(), table = nlmixr2est::tableControl(), env = parent.frame() )"},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr_multimodel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate a list of models based on a single dataset and estimation method — tar_nlmixr_multimodel","text":"name Symbol, name target. target name must valid name symbol R, must start dot. Subsequent targets can refer name symbolically induce dependency relationship: e.g. tar_target(downstream_target, f(upstream_target)) target named downstream_target depends target upstream_target function f(). addition, target's name determines random number generator seed. way, target runs reproducible seed someone else running pipeline get results, two targets pipeline share seed. (Even dynamic branches different names thus different seeds.) can recover seed completed target tar_meta(your_target, seed) run tar_seed_set() result locally recreate target's initial RNG state. ... Named arguments format \"Model description\" = modelFunction data nlmixr data est estimation method (methods shown `nlmixr2AllEst()`). Methods can added tools control estimation control object. expected different type estimation method table output table control object (like `tableControl()`) env environment model setup (needed typical use)","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/reference/tar_nlmixr_multimodel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate a list of models based on a single dataset and estimation method — tar_nlmixr_multimodel","text":"list targets model simplification, data simplification, model estimation.","code":""},{"path":"https://nlmixr2.github.io/nlmixr2targets/news/index.html","id":"nlmixr2targets-0009000","dir":"Changelog","previous_headings":"","what":"nlmixr2targets 0.0.0.9000","title":"nlmixr2targets 0.0.0.9000","text":"Setting initial conditions can now done cmt(initial) automatically recoded cmt(0). Added “cens” “limit” columns nlmixr2 columns Keep columns table argument’s keep element","code":""}]