| Line 10... |
Line 10... |
| 10 |
\alias{$.tclvar}
|
10 |
\alias{$.tclvar}
|
| 11 |
\alias{$<-.tclvar}
|
11 |
\alias{$<-.tclvar}
|
| 12 |
\alias{tclvar}
|
12 |
\alias{tclvar}
|
| 13 |
\alias{tclVar}
|
13 |
\alias{tclVar}
|
| 14 |
\alias{as.character.tclVar}
|
14 |
\alias{as.character.tclVar}
|
| - |
|
15 |
\alias{tclArray}
|
| - |
|
16 |
\alias{[[.tclArray}
|
| - |
|
17 |
\alias{[[<-.tclArray}
|
| - |
|
18 |
\alias{$.tclArray}
|
| - |
|
19 |
\alias{$<-.tclArray}
|
| - |
|
20 |
\alias{names.tclArray}
|
| - |
|
21 |
\alias{length.tclArray}
|
| - |
|
22 |
\alias{names<-.tclArray}
|
| - |
|
23 |
\alias{length<-.tclArray}
|
| 15 |
\alias{tclvalue}
|
24 |
\alias{tclvalue}
|
| 16 |
\alias{tclvalue<-}
|
25 |
\alias{tclvalue<-}
|
| 17 |
\alias{tclvalue.default}
|
26 |
\alias{tclvalue.default}
|
| 18 |
\alias{tclvalue<-.default}
|
27 |
\alias{tclvalue<-.default}
|
| 19 |
\alias{tclvalue.tclVar}
|
28 |
\alias{tclvalue.tclVar}
|
| Line 66... |
Line 75... |
| 66 |
tclVar(init="")
|
75 |
tclVar(init="")
|
| 67 |
\method{as.character}{tclVar}(x)
|
76 |
\method{as.character}{tclVar}(x)
|
| 68 |
\method{tclvalue}{tclVar}(x)
|
77 |
\method{tclvalue}{tclVar}(x)
|
| 69 |
\method{tclvalue}{tclVar}(x) <- value
|
78 |
\method{tclvalue}{tclVar}(x) <- value
|
| 70 |
|
79 |
|
| - |
|
80 |
tclArray()
|
| - |
|
81 |
\method{[[}{tclArray}(x,...)
|
| - |
|
82 |
\method{[[}{tclArray}(x,...) <- value
|
| - |
|
83 |
\method{$}{tclArray}(x, i)
|
| - |
|
84 |
\method{$}{tclArray}(x, i) <- value
|
| - |
|
85 |
\method{names}{tclArray}
|
| - |
|
86 |
\method{length}{tclArray}
|
| - |
|
87 |
|
| 71 |
tclObj(x)
|
88 |
tclObj(x)
|
| 72 |
tclObj(x) <- value
|
89 |
tclObj(x) <- value
|
| 73 |
\method{tclObj}{tclVar}(x)
|
90 |
\method{tclObj}{tclVar}(x)
|
| 74 |
\method{tclObj}{tclVar}(x) <- value
|
91 |
\method{tclObj}{tclVar}(x) <- value
|
| 75 |
|
92 |
|
| Line 179... |
Line 196... |
| 179 |
\code{tclVar} object, then it will assume that it is a character string
|
196 |
\code{tclVar} object, then it will assume that it is a character string
|
| 180 |
explicitly naming global Tcl variable. Tcl variables created by
|
197 |
explicitly naming global Tcl variable. Tcl variables created by
|
| 181 |
\code{tclVar} are uniquely named and automatically unset by the
|
198 |
\code{tclVar} are uniquely named and automatically unset by the
|
| 182 |
garbage collector when the representing object is no longer in use.
|
199 |
garbage collector when the representing object is no longer in use.
|
| 183 |
|
200 |
|
| - |
|
201 |
\code{tclArray} creates a new Tcl array and initalizes it to the empty
|
| - |
|
202 |
array. An R object of class \code{tclArray} and inheriting from class
|
| - |
|
203 |
\code{tclVar} is created to represent it. You can access elements of
|
| - |
|
204 |
the Tcl array using indexing with \code{[[} or \code{$}, which also
|
| - |
|
205 |
allow replacement forms. Notice that Tcl arrays are associative by
|
| - |
|
206 |
nature and hence unordered; indexing with a numeric index \code{i}
|
| - |
|
207 |
refers to the element with the \emph{name}
|
| - |
|
208 |
\code{as.character(i)}. Multiple indices are pasted together separated
|
| - |
|
209 |
by commas to form a single name. You can query the
|
| - |
|
210 |
length and the set of names in an array using methods for
|
| - |
|
211 |
\code{length} and \code{names}, respectively; these cannot
|
| - |
|
212 |
meaningfully be set so assignment forms exist only to print an error
|
| - |
|
213 |
message.
|
| - |
|
214 |
|
| 184 |
It is possible to access Tcl's \sQuote{dual-ported} objects directly,
|
215 |
It is possible to access Tcl's \sQuote{dual-ported} objects directly,
|
| 185 |
thus avoiding parsing and deparsing of their string representation.
|
216 |
thus avoiding parsing and deparsing of their string representation.
|
| 186 |
This works by using objects of class \code{tclObj}. The string
|
217 |
This works by using objects of class \code{tclObj}. The string
|
| 187 |
representation of such objects can be extracted (but not set) using
|
218 |
representation of such objects can be extracted (but not set) using
|
| 188 |
\code{tclvalue} and conversion to vectors of mode \code{"character"},
|
219 |
\code{tclvalue} and conversion to vectors of mode \code{"character"},
|