File: VComments.Rd

package info (click to toggle)
r-cran-r.utils 2.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,864 kB
  • sloc: sh: 18; makefile: 6
file content (135 lines) | stat: -rw-r--r-- 3,861 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
% 
%  VComments.R
% 
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\name{VComments}
\docType{class}
\alias{VComments}


\title{The VComments class}

\description{
 Package:  R.utils \cr
\bold{Class VComments}\cr

\code{\link[R.oo]{Object}}\cr
\code{~~|}\cr
\code{~~+--}\code{\link[R.utils]{SmartComments}}\cr
\code{~~~~~~~|}\cr
\code{~~~~~~~+--}\code{VComments}\cr

\bold{Directly known subclasses:}\cr
\link[R.utils]{LComments}\cr

public static class \bold{VComments}\cr
extends \emph{\link[R.utils]{SmartComments}}\cr



 The VComments class.
}

\usage{
VComments(letter="V", verboseName="verbose", ...)
}

\arguments{
  \item{letter}{The smart letter.}
  \item{verboseName}{The name of the verbose object.}
  \item{...}{Not used.}
}

\section{Fields and Methods}{
 \bold{Methods:}\cr
\tabular{rll}{
 \tab \code{\link[R.utils:convertComment.VComments]{convertComment}} \tab Converts a verbose comment to R code.\cr
 \tab \code{\link[R.utils:reset.VComments]{reset}} \tab Resets a VComments compiler.\cr
 \tab \code{\link[R.utils:validate.VComments]{validate}} \tab Validates the compiled lines.\cr
}


 \bold{Methods inherited from SmartComments}:\cr
compile, convertComment, parse, reset, validate

 \bold{Methods inherited from Object}:\cr
$, $<-, [[, [[<-, 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


}

\details{
 The 'v' in VComments stands for 'verbose', because of its relationship
 to the \code{\link{Verbose}} class.

 Here is a list of VComments and the \R code that replaces each of them
 by the compiler:

 \bold{Constructors}\cr
 \describe{
  \item{#V0#}{[<args>] - NullVerbose(<args>)}
  \item{#V1#}{[<args>] - Verbose(<args>)}
 }

 \bold{Controls}\cr
 \describe{
  \item{#V=#}{[<variable>] - Sets the name of the <verbose> object.
                             Default is 'verbose'.}
  \item{#V^#}{<threshold> - setThreshold(<verbose>, <threshold>)}
  \item{#V?#}{<expression> - if (isVisible(<verbose>)) \{ <expression> \}}
  \item{#V@#}{<level> - setDefaultLevel(<verbose>, <level>)}
  \item{#Vm#}{<method> <args> - <method>(<verbose>, <args>)}
 }

 \bold{Enters and exits}\cr
 \describe{
  \item{#V+#}{[<message>] - enter(<verbose>, <message>)}
  \item{#V-#}{[<message>] - exit(<verbose>, <message>)}
  \item{#V!#}{[<message>] - pushState(<verbose>)\cr
                            on.exit(popState(<verbose>))\cr
                            If <message>, enter(<verbose>, <message>)}
 }

 \bold{Simple output}\cr
 \describe{
  \item{#Vn#}{<ignored> - newline(<verbose>)}
  \item{#Vr#}{<ignored> - ruler(<verbose>)}
  \item{#Vt#}{<ignored> - timestamp(<verbose>)}
  \item{#Vw#}{[<title>] - warnings(<verbose>, <title>)}
 }

 \bold{Output messages}\cr
 \describe{
  \item{#Vc#}{[<message>] - cat(<verbose>, <message>)}
  \item{#Ve#}{<expression> - eval(<verbose>, <expression>)}
  \item{#Vh#}{<message> - header(<verbose>, <message>)}
  \item{#Vp#}{<object> - print(<verbose>, <object>)}
  \item{#Vs#}{<object> - summary(<verbose>, <object>)}
  \item{#Vz#}{<object> - str(<verbose>, <object>)}
 }
}

\examples{
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")
}

\author{Henrik Bengtsson}



\keyword{classes}
\keyword{programming}
\keyword{IO}