Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

compile.SmartComments

Preprocess a vector of code lines


Description

Preprocess a vector of code lines.

Usage

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

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.

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.

Value

Returns a character vector.

Author(s)

Henrik Bengtsson

See Also

For more information see SmartComments.


R.utils

Various Programming Utilities

v2.10.1
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.