Abstract class SmartComments

Package: R.utils Class SmartComments Object ~~| ~~+--SmartComments Directly known subclasses: LComments, VComments public abstract static class SmartComments extends Object Abstract class SmartComments.

classes, programming, IO
SmartComments(letter=NA, ...)
A single character.
Not used.

A "smart" source-code comment is an Rcomment, which start with a '#', but is followed by a single letter, then a single symbol and a second '#' and then an option character string, and there must not be any code before the comment on the same line. In summary, a smart comment line has format: ## .

Example code with two smart comments (VComments): x <- 2 \#V1\# threshold=-1 \#Vc\# A v-comment log message cat("Hello world") which after compilation becomes x <- 2 verbose <- Verbose(threshold=-1) if (verbose) { cat(verbose, "A v-comment log message"); } cat("Hello world")

Fields and Methods

Methods: rll{ compile Preprocess a vector of code lines. convertComment Converts a single smart comment to R code. parse Parses one single smart comment. reset Resets a SmartComments compiler. validate Validates the compiled lines. }

Methods inherited from Object: $, $<-, [[, [[<-, as.character, attach, attachLocally, clearCache, clearLookupCache, clone, detach, equals, extend, finalize, gc, getEnvironment, getFieldModifier, getFieldModifiers, getFields, getInstantiationTime, getStaticInstance, hasField, hashCode, ll, load, objectSize, print, registerFinalizer, save

See Also


  • SmartComments
Documentation reproduced from package R.utils, version 1.26.2, License: LGPL (>= 2.1)

Community examples

Looks like there are no examples yet.