VComments | R Documentation |
Package: R.utils
Class VComments
Object
~~|
~~+--
SmartComments
~~~~~~~|
~~~~~~~+--
VComments
Directly known subclasses:
LComments
public static class VComments
extends SmartComments
The VComments class.
VComments(letter="V", verboseName="verbose", ...)
letter |
The smart letter. |
verboseName |
The name of the verbose object. |
... |
Not used. |
The 'v' in VComments stands for 'verbose', because of its relationship
to the Verbose
class.
Here is a list of VComments and the R code that replaces each of them by the compiler:
Constructors
[<args>] - NullVerbose(<args>)
[<args>] - Verbose(<args>)
Controls
[<variable>] - Sets the name of the <verbose> object. Default is 'verbose'.
<threshold> - setThreshold(<verbose>, <threshold>)
<expression> - if (isVisible(<verbose>)) { <expression> }
<level> - setDefaultLevel(<verbose>, <level>)
<method> <args> - <method>(<verbose>, <args>)
Enters and exits
[<message>] - enter(<verbose>, <message>)
[<message>] - exit(<verbose>, <message>)
[<message>] - pushState(<verbose>)
on.exit(popState(<verbose>))
If <message>, enter(<verbose>, <message>)
Simple output
<ignored> - newline(<verbose>)
<ignored> - ruler(<verbose>)
<ignored> - timestamp(<verbose>)
[<title>] - warnings(<verbose>, <title>)
Output messages
[<message>] - cat(<verbose>, <message>)
<expression> - eval(<verbose>, <expression>)
<message> - header(<verbose>, <message>)
<object> - print(<verbose>, <object>)
<object> - summary(<verbose>, <object>)
<object> - str(<verbose>, <object>)
Methods:
convertComment | - | |
reset | - | |
validate | - | |
Methods inherited from SmartComments:
compile, convertComment, parse, reset, validate
Methods inherited from Object:
$, $<-, [[, [[<-, as.character, attach, attachLocally, clearCache, clearLookupCache, clone, detach, equals, extend, finalize, getEnvironment, getFieldModifier, getFieldModifiers, getFields, getInstantiationTime, getStaticInstance, hasField, hashCode, ll, load, names, objectSize, print, save
Henrik Bengtsson
filename <- system.file("data-ex/exampleVComments.R", package="R.utils")
lines <- readLines(filename)
cat("Code before preprocessing:\n")
displayCode(code=lines, pager="console")
lines <- VComments$compile(lines)
cat("Code after preprocessing:\n")
displayCode(code=lines, pager="console")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.