text_manipulate: Manipulate an expression that produces text output

Description Usage Arguments Examples

View source: R/text_manipulate.R

Description

Manipulate an expression that produces text output

Usage

1
  text_manipulate(._expr, ...)

Arguments

._expr

expression to produce output.

...

used to specify controls. See picker, checkbox, slider.

These controls may also be specified through a object, from which the control is guessed. A logical maps to checkbox. A character maps to picker. A numeric to slider. This mapping can be specified as an arithmetic sequence of points (length 5 or greater), or as a numeric vector of length 2 to 4 with defaults like: c(min, max, step=1, initial=min)

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
## test it out
x <- rnorm(1:100, 10, 10); y <- rnorm(1:100, 5,5);
text_manipulate({
cut_it <- function(x, n) cut(x, seq(min(x), max(x), length.out=n))
xtabs(~ cut_it(y, m) + cut_it(x, n))
}, m= slider(2, 20, 2, 1), n = slider(2, 20, 2, 1))

## End(Not run)

gWidgetsManipulate documentation built on May 2, 2019, 5:26 p.m.