Learn R Programming

rsyncrosim (version 1.2.9)

command: SyncroSim console command

Description

Issues a command to the SyncroSim console and returns the output.

Usage

command(args, session = NULL, program = "SyncroSim.Console.exe", wait = TRUE)

Arguments

args

Character string, named list, named vector, unnamed list, or unnamed vector. Arguments for the SyncroSim console. See details.

session

Session. If NULL, a default session will be used.

program

Character. The name of the target SyncroSim executable. Options include SyncroSim.Console.exe (default), SyncroSim.Server.exe, SyncroSim.PackageManager.exe and SyncroSim.Multiband.exe.

wait

Logical. If TRUE (default) R will wait for the command to finish before proceeding. Note that silent(session) is ignored if wait=FALSE.

Value

A character string, output from the SyncroSim program.

Details

Example args, and the resulting character string passed to the SyncroSim console:

  • Character string e.g. "--create --help": "--create --help"

  • Named list or named vector e.g. list(name1=NULL,name2=value2): "--name1 --name2=value2"

  • Unnamed list or unnamed vector e.g. c("create","help"): "--create --help"

Examples

Run this code
# NOT RUN {
# Use a default session to create a new library in the current working directory.
args <- list(create = NULL, library = NULL, 
        name = paste0(tempdir(), "/temp.ssim"), 
        package = "stsim")
output <- command(args, session = session(printCmd = TRUE))
output

# Three different ways to provide args to command
command(c("create", "help"))
command("--create --help")
command(list(create = NULL, help = NULL))
# }

Run the code above in your browser using DataLab