Learn R Programming

R.utils (version 2.12.3)

compile.SmartComments: Preprocess a vector of code lines

Description

Preprocess a vector of code lines.

Usage

# S3 method for SmartComments
compile(this, lines, trim=TRUE, excludeComments=FALSE, ...)

Value

Returns a character

vector.

Arguments

lines

A character vector of lines of code to be preprocessed.

trim

If TRUE, trailing whitespace characters are removed from every line of code, and contiguous empty lines are replaced with a single empty line.

excludeComments

If TRUE, comments in the input lines, that is, also smart comments, are excluded.

...

Not used.

Author

Henrik Bengtsson

Details

When called, the compiler is reset.

Just before trimming is done, the validate() method is called. In the current class, this does nothing, but can be overridden in subclasses.

See Also

For more information see SmartComments.