call_gadget: Call Gadget executable on the command line

Description Usage Arguments Value Examples

Description

This function will call the gadget command with the given switches as arguments

Usage

1
2
call_gadget(switches = list(s = TRUE, i = "params.in"), path = NULL,
  gadget_exe = "gadget", print_out = TRUE, print_err = TRUE)

Arguments

switches

List of named switches to supply to Gadget executable. Names correspond to the switch; values correspond to additional arguments. If no argument is needed the value should be logical TRUE.

path

Optional. Character vector of path to the directory where Gadget files are located

gadget_exe

The Gadget executable to use

print_out

Logical. Should Gadget command line output be printed.

print_err

Logical. Should Gadget command line errors be printed.

Value

If print_out = TRUE or print_err = TRUE, a character vector giving the output of the command, one line per string, else nothing

Examples

1
2
3
4
path <- system.file(gad_mod_dir, package = "gadgetSim")
call_gadget(switches = list(s = TRUE, i = "params.in", log = "logfile"), path = path)
call_gadget(switches = list(s = TRUE, i = "WGTS/params.final", main = "WGTS/main.final"),
            path = path)

inspktrgadget/gadgetSim documentation built on May 10, 2019, 9:51 a.m.