redExpand: Insert the content of a file into a vector

View source: R/redcas.R

redExpandR Documentation

Insert the content of a file into a vector

Description

A vector of REDUCE commands may contain the name of a file containing REDUCE commands. redExpand returns a vector containing the commands up to the element containing the file name, the contents of the file and the elements following the file name. Multiple files may be specified in the input vector.

Usage

redExpand(x)

Arguments

x

vector of commands to submit to REDUCE, possibly including names of files of commands to submit.

Details

redExpand is called by redExec before submitting commands so it is generally not necessary to call it explicitly. It can be used if you wish do the expansion yourself. If the input vector elements xj, xk, where j < k, are file references, then the output vector will consist of

  • x1...xj-1
  • the contents of xj

  • xj+1...xk-1
  • the contents of xk

  • xk+1...xn

Value

a character vector containing the commands to submit with any file names replaced by their contents.

Author(s)

Martin Gregory

See Also

redExec


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