addToCommandFile: FUSION R command line interface - Write comments or other...

View source: R/CoreFunctions.R

addToCommandFileR Documentation

FUSION R command line interface – Write comments or other lines to command file

Description

addToCommandFile writes lines to a command file (batch file). The normal behavior is to write comments but with comment=FALSE, you can write commands.

Usage

addToCommandFile(
  line = "",
  cmdFile = NULL,
  cmdClear = FALSE,
  comment = TRUE,
  addLine = TRUE
)

Arguments

line

character: line to be written to the command file. You can start or end line with newline characters to add blank lines.

cmdFile

character: contains the name of the file to which commands should be written.

cmdClear

boolean: indicates file for command should be deleted before the command line is written. Use this option with caution as it will wipe out the contents of the command file.

comment

boolean: line is preceded by "REM" when TRUE, otherwise not.

addLine

boolean: if TRUE, a blank line is added to the command file before writing line.

Value

invisible boolean indicating success or failure

Examples

## Not run: 
addToCommandFile("This is a comment!!", "Test/test.bat")

# add a single blank line to the command file when setGlobalCommandOptions has
# been called to set the command file name
addToCommandFile(addLine = FALSE, comment = FALSE)

## End(Not run)

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