[Stable]

This function is used by the "code libary" RStudio 'Addin' to bring external code into your project.

import(
  copy_table,
  overwrite = FALSE,
  silent = FALSE,
  skip = "\\.mod$",
  find_replace_dir_names = TRUE
)

Arguments

copy_table

A data frame or character. if data.frame should be output from stage(), if character path, result will be stage()d first.

overwrite

Logical (default = FALSE).

silent

Logical (default = FALSE).

skip

Character (default = "\\.mod$"). Pattern to skip. Model files will be imported directly into the project in order to avoid conflicts and will instead reside only in the staging area.

find_replace_dir_names

Logical (default = TRUE). Will attempt to find replace strings in scripts to reflect nm_default_dirs().

Value

Invisibly returns copy_table argument.

Examples


## requires NMproject directory structure
if (FALSE) {

## both of these following operations are easier in the shiny code library
## RStudio 'Addin'.

ls_code_library("Models/ADVAN2.mod") %>%
  import() ## ends up in "staging/Models"

ls_code_library("Scripts/AUC.R") %>%
  import() ## ends up "scripts" directory
}