Learn R Programming

AnalysisPageServer (version 1.6.2)

default.param: default.param

Description

Build a default AnalysisPageParam for one argument

Usage

default.param(name, prototype, ...)

Arguments

name
Name of the parameter
prototype
Default value on which the parameter should be built.
...
Further arguments passed to the constructor for the appropriate parameter type. For example, you can include label, description, advanced and show.if.

Value

AnalysisPageParam

Details

You provide the name of the argument and default and I build an AnalysisPageParam. The magic here is as follows:
  1. Named lists become compound.param, with default.param() then called recursively.
  2. Unnamed lists of become array.param, with default.param() called on the first element of the list to build the prototype. The length of the list is taken as the start value. min/max default to 0/Inf. (Advanced Note: the name is copied to the sub-element)
  3. Vectors of length > 1 become select.params
  4. Vectors of length 0 or 1 and NULLs become simple.params

On any other type of argument it throws an error.

Examples

Run this code
default.param(name = "word", prototype = c("foo", "bar", "baz"), label = "Choose a word")

Run the code above in your browser using DataLab