code_library: Code Library

View source: R/import-code.R

code_libraryR Documentation

Code Library

Description

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]").

Usage

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).

Details

Requires getOption("code_library_path") to be set.

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.

See Also

ls_code_library(), stage(), import()

Examples


code_library(viewer = FALSE, return_info = TRUE)


tsahota/NMproject documentation built on Oct. 1, 2022, 11:51 a.m.