Function not designed for direct use. Instead use the RStudio code library entry on the RStudio 'Addins' menu. This will open the shiny app. Select the file, and click "preview" to view and import() to bring into the "staging" area of your project. See vignette at https://tsahota.github.io/NMproject/ for a video showing use of the app. NONMEM control files will intentionally not be imported straight in the "Models" directory and instead go into "staging/Models". This staging location can be referred to when creating nm objects with new_nm(..., based_on = "staging/Models/[filename]").

code_library(
  extn = NULL,
  fields = "Description",
  viewer = TRUE,
  silent = FALSE,
  return_info = FALSE
)

Arguments

extn

Vector string of extensions to include (default = NULL includes all).

fields

Character vector of fields to extract.

viewer

Logical indicating if viewer should be used to display results (default=FALSE).

silent

Logical indicating if messages should be silenced (default=FALSE).

return_info

Logical (default = FALSE). Return data.frame of results (FALSE= returns file paths).

Value

If return_info = TRUE, invisibly returns output a tibble with code library information. Otherwise (this may be deprecated soon), will return paths to code library files.

Details

Requires getOption("code_library_path") to be set.

Examples


code_library(viewer = FALSE, return_info = TRUE)
#> Loading required namespace: roxygen2
#>                                                            FOLDER
#> 1  /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 2  /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 3  /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 4  /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 5  /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 6  /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 7  /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 8  /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 9  /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 10 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 11 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 12 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 13 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 14 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 15 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 16 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 17 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 18 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 19 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 20 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 21 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 22 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 23 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 24 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 25 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 26 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 27 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 28 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 29 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 30 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 31 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#> 32 /Users/runner/work/_temp/Library/NMproject/extdata/CodeLibrary
#>                       NAME                                     Description
#> 1   DerivedData/THEOPP.csv                                            <NA>
#> 2        Models/ADVAN1.mod                                  1CMT (default)
#> 3  Models/ADVAN1TRANS1.mod                                   1CMT (TRANS1)
#> 4        Models/ADVAN2.mod                           1CMT + Oral (default)
#> 5  Models/ADVAN2TRANS1.mod                            1CMT + Oral (TRANS1)
#> 6        Models/ADVAN3.mod                                  2CMT (default)
#> 7  Models/ADVAN3TRANS1.mod                                   2CMT (TRANS1)
#> 8  Models/ADVAN3TRANS3.mod                                   2CMT (TRANS3)
#> 9        Models/ADVAN4.mod                           2CMT + Oral (default)
#> 10 Models/ADVAN4TRANS1.mod                            2CMT + Oral (TRANS1)
#> 11 Models/ADVAN4TRANS3.mod                            2CMT + Oral (TRANS3)
#> 12          Models/DES.mod                       Differential equation use
#> 13    Models/Emax_PRED.mod                                      Emax model
#> 14  Models/NegBinomial.mod                 Count data (Neg-binomial) model
#> 15      Models/Poisson.mod                      Count data (Poisson) model
#> 16          Models/TTE.mod                       Differential equation use
#> 17       Models/binary.mod                       Logistic regression model
#> 18      Models/example.scm                                            <NA>
#> 19   Models/pk1cmt_pop.cpp                                            <NA>
#> 20                 R/AUC.R                                   Calculate AUC
#> 21       R/convert.to.na.R                 Replace -99 with NA in dataset.
#> 22 R/covariate_summaries.R            Functions for summarising covariates
#> 23          R/gof_ggplot.R        Create pdf diagnostic report with ggplot
#> 24           R/gof_xpose.R         Create pdf diagnostic report with xpose
#> 25        R/group.factor.R Group a set of values into equally sized groups
#> 26                R/locf.R                Last observation carried forward
#> 27           R/rep_times.R                             Create dosing times
#> 28                R/snap.R                          metrumrg snap function
#> 29  Scripts/BinomRegMeta.R          Binomial regression meta-analysis in R
#> 30  Scripts/deSolvePKsim.R                           PK simulation deSolve
#> 31    Scripts/theoppStan.R                    Stan PK (Rbloggers 19/04/15)
#> 32   SourceData/THEOPP.csv                                            <NA>