sliderv | R Documentation |
Create a Tk slider window with the sliders positioned vertically instead of horizontally.
sliderv(refresh.code, names, minima, maxima, resolutions, starts,
title = "control", no = 0, set.no.value = 0)
refresh.code |
Function to be called when sliders are moved. |
names |
Labels for the sliders. |
minima |
Vector of minimum values for the sliders. |
maxima |
Vector of maximum values for the sliders. |
resolutions |
Vector of resolutions for the sliders. |
starts |
Vector of starting values for the sliders. |
title |
Title to put at the top of the Tk box. |
no |
The number of the slider whose value you want. |
set.no.value |
Vector of length 2 with the number of slider to set and the new value. |
This is a variation on the slider
function with vertical sliders
arranged in a row rather than horizontal sliders arranged in a column.
This is based on an early version of slider
and therefore does
not have as many bells and whistles (but sometimes fits the screen better).
Returns the value of a given slider when used as: slider(no=i)
.
You can move the slider in 3 different ways: You can left click and drag the slider itself, you can left click in the trough to either side of the slider and the slider will move 1 unit in the direction you clicked, or you can right click in the trough and the slider will jump to the location you clicked at.
This function may not stay in this package (consider it
semi-depricated). See the tkexamp
function for another
approach to do the same thing.
Greg Snow 538280@gmail.com
tkexamp
, slider
if(interactive()){
face.refresh <- function(...){
vals <- sapply(1:15, function(x) slider(no=x))
faces( rbind(0, vals, 1), scale=F)
}
sliderv( face.refresh, as.character(1:15), rep(0,15), rep(1,15),
rep(0.05, 15), rep(0.5,15), title='Face Demo')
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.