default.param {AnalysisPageServer} | R Documentation

## 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`.

### 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.param`s

4. Vectors of length 0 or 1 and NULLs become `simple.param`s

On any other type of argument it throws an error.

### Value

AnalysisPageParam

### Author(s)

Brad Friedman

### Examples

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

[Package AnalysisPageServer version 1.21.0 Index]