Learn R Programming

AnalysisPageServer (version 1.4.0)

simple.param: simple.param

Description

Build a simple AnalysisPageParam

Usage

simple.param(name, label = name, description = label, value = "", type = "text", advanced = 0, show.if = NULL, display.callback = NULL, size = "medium", required = TRUE, persistent = NULL, persistent.dependencies = NULL)

Arguments

name
Name of form element
label
Label for form element (typically rendered to the left of the element)
description
Description for form element (typically rendered as roll-over text)
value
The default, starting value, for the form (default: "")
type
Type of form element. This can be "text", "textarea", "checkbox", "password" or "file"
advanced
Integer. 0 means the option is not advanced, and increasing levels indicate the option is for more advanced users. Advanced > 0 should be hidden under default mode.
show.if
A list of two elements: $name, giving the name of some other param in the set and $values, a character vector of values. The parameter under construction should only be shown if the named parameter takes on any of the values in the $values vector. Default (NULL) is to always show the parameter under construction.
display.callback
NULL, to follow show.if logic in deciding when/if to display the element, or a list with the two elements $uri and $dependent, which follow the same format as the corresponding arguments to combobox.param and provide a templated uri and a mapping from template variables to form parameters. The service should return JSON true if the widget is to be shown and false if not. It is allowed to have both a display.callback and a show.if---both conditions must be met in order to display the element.
size
A word giving the size of the element. The interpretation of this size is up to the front-end. Must from a defined set of words, which you can see by calling known.param.sizes() (currently no way to change this). Default: medium
required
Logical. Is this a required param? Default: TRUE. If set, then the front-end will the front-end user is required to set this parameter before submitting the request. The meaning of "set this parameter" is not entirely clear.
persistent
Character or NULL. If non-NULL then it is passed to the front-end. It names a variable in persistent storage that should be used to initialize the value of the parameter. The front end will provide some mechanism to change the persistent value, but until the user does so the param will be initialized from the value in the persistent space.
persistent.dependencies
A character vector or NULL (default) specifying the names of other parameters on which this one "depends". It is an error to provide this when persistent is NULL. When persistent is non-NULL, providing persistent.dependencies makes this parameter not just "persistent" but "conditionally persistent", which is to say that the persistent value for this parameter is actually a hash lookup based on the the other parameters specified in this vector. A typical example would be a pheno fields parameter which is dependent on the study parameter. The names are taken from the Page namespace, which means that a parameter's $name is used when this differs from its $persistent slot.

Value

An AnalysisPageParam. This is just a list with class name slapped on.

Details

Build a simple AnalysisPageParam. These include mainly parameters that can be rendered simply as HTML tags.

Examples

Run this code
x <- simple.param("xmin", label="X-min", description="Minimum x value", type="text")

Run the code above in your browser using DataLab