Learn R Programming

VLMC (version 1.3-13)

draw.vlmc: Draw a "VLMC" Object (in ASCII) as tree.

Description

Draws a vlmc object, typically the result of vlmc(.), to the Rconsole, using one line per node.

Usage

draw(x, ...)
## S3 method for class 'vlmc':
draw(x, kind = 3, flag = TRUE, show.hidden = 0,
     cumulative = TRUE, delta = cumulative, debug = FALSE, \dots)

Arguments

x
typically the result of vlmc(..).
kind
integer code for the kind of drawing, in {0,1,2,3}.
flag
logical; ..
show.hidden
integer code; if not 0, give some indications about hidden (final) nodes .....
cumulative
logical indicating if the cumulative counts should be shown for nonterminal nodes; the `delta's can only be computed from the cumulative counts, i.e., cumulative = FALSE should be used only by the knowing one.
delta
logical indicating if delta, i.e. $\delta$$(n, p(n))$ should be computed and printed for each (non-root) node $n$ with parent $p(n)$. Note that this does not really make sense when cumulative = FALSE.
debug
logical; if TRUE, some extraneous progress information is printed to the Rconsole.
...
(potentially more arguments)

Value

  • nothing is returned.

Details

............. .............

Note that the counts internally are stored ``non-cumulatively'', i.e., as difference counts which is useful for likelihood (ratio) computations. In the internal C code, the difference counts are originally computed by the comp_difference() function after tree generation. draw(*, cumulative = TRUE) internally calls the C function cumulate() for the cumulative sums.

See Also

vlmc.

Examples

Run this code
example(vlmc)
  draw(vlmc.dt1c01)
  draw(vlmc.dt1c01, flag = FALSE)
  draw(vlmc.dt1c01, kind = 1)
  draw(vlmc.dt1)
  draw(vlmc.dt1, show = 3)
  draw(vlmc.dt1, cumulative = FALSE)

Run the code above in your browser using DataLab