system_fetch_template: Create New Analysis Template

Description Usage Arguments Details Value Examples

View source: R/ubiquity.r

Description

Building a system file will produce templates for R and other languages. This function provides a method to make local copies of these templates.

Usage

1
2
3
4
5
6
system_fetch_template(
  cfg,
  template = "Simulation",
  overwrite = FALSE,
  output_directory = getwd()
)

Arguments

cfg

ubiquity system object

template

template type

overwrite

if TRUE the new system file will overwrite any existing files present

output_directory

directory where workshop files will be placed (getwd())

Details

The template argument can have the following values

Value

List with vectors of template sources, destinations and corresponding write success (write_file), also a list element indicating the overall success of the function call (isgood)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Creating a system file from the mab_pk example
fr = system_new(file_name        = "system.txt", 
                system_file      = "mab_pk", 
                overwrite        = TRUE, 
                output_directory = tempdir())

# Building the system 
cfg = build_system(system_file  = file.path(tempdir(), "system.txt"),
      output_directory          = file.path(tempdir(), "output"),
      temporary_directory       = tempdir())

# Creating a simulation template
fr =  system_fetch_template(cfg, 
      template         = "Simulation", 
      output_directory = tempdir())

ubiquity documentation built on Sept. 5, 2021, 5:15 p.m.