Learn R Programming

traitr (version 0.13)

rangeItem: A range selection item...

Description

A range selection item

Usage

rangeItem(value="", from=0, to=10, by=1, name, label=name, help="",
    tooltip="", attr, model, editor, ...)

Arguments

value
Default data frame for the model
from
Starting value of range
to
Ending value of range
by
Step size to step through range. If an integer, a spinbutton is also displaye
name
Required name for object. Names should be unique within a group of items
label
Optional label, default value is the name
help
Optional help string
tooltip
Optional tooltip to display
attr
A list of attributes to pass to widget on construction. Eg. attr=list(size=c(100,200))
model
Optional model. Useful if one wishes to use same model for multiple views
editor
Specification of editor (a view) to override default
...
Passed to Item trait

Value

  • A proto object. Call obj$show_help() to view its methods and properties.

Details

Editor is a slider (with spinbutton when by value is an integer).

Examples

Run this code
i <- rangeItem(value=5, from=0, to=10, by=1, name="rng")
i$get_rng()
i$set_rng(10)
i$get_rng()

Run the code above in your browser using DataLab