domino.runCommand {domino}R Documentation

domino.runCommand

Description

Runs domino client command and runs success callback or shows failure message

Usage

domino.runCommand(commandAndArgs, successCallback = domino.OK,
failureMessage = "Executing the command failed", stdInput = FALSE)

Arguments

commandAndArgs

The commandAndArgs argument is a string that matches standard domino client's syntax,ex. "get quick-start" or "download".

successCallback

A function that will be called when domino command executes successfuly. Defaults to noop function.

failureMessage

A string representing failure message that should be printed when command fails. Has default value.

stdInput

Internal string data that is pushed to domino client's stdio streams. Default is no stdio stream input.

Examples

## Not run: 
success <- function() {
print("Success!")
}
domino.runCommand("run main.R 1 2 3",success, "failed to succeed")
# Runs command "run main.R 1 2 3" and 
# calls 'success' function if domino command ends successfuly.
# Prints error message  - "failed to succeed" if domino command fails.

## End(Not run)


[Package domino version 0.3.1 Index]