visr.param: Add app parameter

Description Usage Arguments Examples

Description

Adds a new parameter to the curent app.

Usage

1
2
3
4
5
6
7
visr.param(name, label = NULL, info = NULL, type = c("string",
  "character", "int", "integer", "double", "boolean", "logical", "multi-string",
  "column", "multi-column", "column-numerical", "multi-column-numerical",
  "color", "multi-color", "filename", "output-column", "output-multi-column",
  "output-table"), default = NULL, min = NULL, max = NULL, items = NULL,
  item.labels = NULL, filename.mode = c("load", "save", "dir"),
  debugvalue = NULL)

Arguments

name

Parameter name. will be appended to "visr.param." to create the full variable name in R.

label

The label for the parameter's GUI control. Will use variable name if not specified (NULL).

info

Additional information about parameter. Will be shown as tooltip in VisRseq.

type

Parameter type

default

Initial default value for the parameter.

min

Minimum value for numerical type parameters ("int", "double")

max

Maximum value for numerical type parameters ("int", "double")

items

Specify a vector of items for a "string" variable to select from.

item.labels

Specify a vector of items to be used as the labels for items argument.

filename.mode

Specify the file dialog mode (file load, file save or directory) for a "filename" type parameter

debugvalue

The value to be assigned to the R variable in debug mode. Useful for unit testing.

Examples

1
2
3
4
5
6
7
visr.param("k", type = "integer") # specify type
visr.param("k", default = 3L) # will infer type from default value
visr.param("k", label = "number of clusters")  # explicitly specify label
visr.param("title") # no type or default value: treated as a "string" type
visr.param("algorithm", items = c("Hartigan-Wong", "Lloyd", "Forgy", "MacQueen"))
visr.param("columns", type = "multi-column-numerical")
visr.param("output.clusterid", type = "output-column") # column appended to input table

hyounesy/bioc2016.visrseq documentation built on May 17, 2019, 10:07 p.m.