Knob to manipulate a real valued variable

Share:

Description

knob creates a slider twiddlerControl for manipulating real valued numerical variables.

Usage

1
2
3
4
  knob(lim = c(0, 1), res = 0.01, default = lim[1],
    label = as.character(NA),
    ticks = abs(lim[2] - lim[1])/4, indicator = TRUE,
    length = 320)

Arguments

lim

A vector of two numbers, defining the lower and upper limits of the slider.

res

The resolution or step size of the slider.

default

The default numeric value D for the slider. lim[1] <= D <= lim[2] must hold.

label

The text label of the slider.

ticks

The tick interval, defaults to abs(lim[2] - lim[1]) / 4. Set this to 0 to suppress drawing of ticks altogether.

indicator

Whether to show the current value as an indicator above the slider's handle, defaults to TRUE.

length

The length of the slider in pixels, default to 320.

Value

A slider twiddlerControl to be used as an argument to twiddle.

See Also

twiddle