args.player: An interactive Tcl/Tk Tool for Evaluation of Functions Calls

Description Usage Arguments Details Author(s) Examples

View source: R/relax.R

Description

args.player is a simple tool for checking the effect of different inputs to a function. args.player creates a small Tcl/Tk widget showing the arguments of the function and the values of the arguments. The values can be modified by typing in new values. A click on the Eval button starts the function with the fixed parameters and you can consider the results.

Usage

1
args.player(fn.call, width.of.label = 20, width.of.entry = 25, main)

Arguments

fn.call

a function call or a function name

width.of.label

width of the region used for printing the argument names

width.of.entry

width of the entry fields for the values of the arguments

main

title for the widget

Details

There are two ways of usage: At first the input of args.player can be a complete function call. Then you should name the arguments correctly to prevent problems of identification. Secondly, it is possible to call args.player with a function name, only. In this case arguments will be searched by arg.

Author(s)

Peter Wolf, pwolf@wiwi.uni-bielefeld.de

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# do not run
## Not run: 
    args.player(mean)

## End(Not run)
## Not run:  
    fun <- function(n = 100, m=0, sd=1, type="l", bty="n", 
                    xlim = c(0,1), col = "red", main = "title" ){
             x <- rnorm(n,m,sd)
             plot(x, type=type, bty=bty, xlim = xlim, col = col, main = main)
           }
    args.player( 
       fun( n = 100, m = 5, sd = 10, type = "l", bty = "n", 
            xlim = c(0,10), col = "blue", main = "effect of plot parameters" ), 
       main="some plot test" 
    ) 

## End(Not run)

relax documentation built on May 30, 2017, 6:30 a.m.

Related to args.player in relax...