redDropOut: Removes certain elements from the REDUCE output.

View source: R/redcas.R

redDropOutR Documentation

Removes certain elements from the REDUCE output.

Description

Removes blank lines or the submit block end marker from the REDUCE output.

Usage

redDropOut(x, what)

Arguments

x

a character vector containing REDUCE output

what

a character string describing what to drop. what='blank' removes blank lines, i.e. those matching regular expression "^$" while what='marker' removes the end of block marker

Details

redDropOut is called by redExec if the option drop.blank.lines is TRUE, so you generally do not need to call it explicity. If you have forgotten to set the option, you can use this function to remove blank lines.

The purpose of what='marker' is to remove the end of block marker described in the details section of redExec. This may be useful if you need to process a REDUCE transcript not produced by redcas.

When removing blank lines and the output is not LaTeX or the switch NAT is on, output may be difficult to read and difficult to parse.

Value

The input vector with the corresponding elements removed.

Author(s)

Martin Gregory

See Also

redExec

Examples

x <- c("first", "", "last")
## this will return elements 1 and 3:
redDropOut(x, "blank")

redcas documentation built on April 12, 2025, 1:40 a.m.