dispatchCommand: FUSION R command line interface - Execute command lines or...

View source: R/CoreFunctions.R

dispatchCommandR Documentation

FUSION R command line interface – Execute command lines or write them to a file.

Description

This is a helper function used in the fusionwrapr package to either execute command lines or write them to a file.

Usage

dispatchCommand(
  cmd,
  options,
  required,
  runCmd,
  saveCmd,
  cmdClear,
  cmdFile,
  comment = NULL
)

Arguments

cmd

character string containing the program name and possibly the path.

options

character string containing command line options.

required

character string(s) containing required parameters for the command line.

runCmd

boolean indicating command line should be executed.

saveCmd

boolean indicating command line should be written to a file.

cmdClear

boolean indicating file for command should be deleted before the command line is written.

cmdFile

character string containing the name of the file to which commands should be written.

comment

character string containing comment to be written to command file before writing the actual command. Only used when runCmd = FALSE and saveCmd = TRUE. When written, there is always a blank line before the comment line in the command file.

Value

A single integer value or vector of integers. If required is a vector of strings and runCmd = TRUE, the return is a vector of return codes from the operating system indicating the return values from the FUSION program. If required is a vector of values, runCmd = FALSE and saveCmd = TRUE, the return is a vector of zeros. if required is a single string and runCmd = TRUE, the return is the return value from the FUSION program. If required is a single string and runCmd = FALSE and saveaCmd = TRUE, the return value is 0.

Examples

## Not run: 
dispatchCommand("ClipData", "/minht:2.0", "*.las clip1.las", runCmd = TRUE)
dispatchCommand("ClipData", "/minht:2.0", "*.las clip1.las",
                 runCmd = FALSE, cmdClear = TRUE, cmdFile = "test.bat")

## End(Not run)

bmcgaughey1/fusionwrapr documentation built on Dec. 1, 2024, 7:13 a.m.