rk.XML.matrix: Create XML "matrix" node for RKWard plugins

View source: R/rk.XML.matrix.R

rk.XML.matrixR Documentation

Create XML "matrix" node for RKWard plugins

Description

Create XML "matrix" node for RKWard plugins

Usage

rk.XML.matrix(
  label,
  mode = "real",
  rows = 2,
  columns = 2,
  min = NULL,
  max = NULL,
  min_rows = 0,
  min_columns = 0,
  allow_missings = FALSE,
  allow_user_resize_columns = TRUE,
  allow_user_resize_rows = TRUE,
  fixed_width = FALSE,
  fixed_height = FALSE,
  horiz_headers = NULL,
  vert_headers = NULL,
  id.name = "auto",
  help = NULL,
  component = rk.get.comp(),
  i18n = NULL
)

Arguments

label

Character string, a label for the matrix.

mode

Character string, one of "integer", "real" or "string". The type of data that will be accepted in the table (required)

rows

Number of rows in the matrix. Has no effect if allow_user_resize_rows=TRUE.

columns

Number of columns in the matrix. Has no effect if allow_user_resize_columns=TRUE.

min

Minimum acceptable value (if mode is "integer" or "real"). Defaults to the smallest representable value.

max

Maximum acceptable value (if mode is "integer" or "real"). Defaults to the largest representable value.

min_rows

Minimum number of rows, matrix will refuse shrink below this size.

min_columns

Minimum number of columns, matrix will refuse shrink below this size.

allow_missings

Logical, whether missing (empty) values are allowed in the matrix (if mode is "string").

allow_user_resize_columns

Logical, if TRUE, the user can add columns by typing on the rightmost (inactive) cells.

allow_user_resize_rows

Logical, if TRUE, the user can add rows by typing on the bottommost (inactive) cells.

fixed_width

Logical, assume the column count will not change. The last (or typically only) column will be stretched to take up the available width. Do not use in combination with matrices, where the number of columns may change in any way. Useful, esp. when creating a vector input element (rows="1").

fixed_height

Logical, force the GUI element to stay at its initial height. Do not use in combindation with matrices, where the number of rows may change in any way. Useful, esp. when creating a vector input element (columns="1").

horiz_headers

Character vector to use for the horiztonal header. Defaults to column number.

vert_headers

Character vector to use for the vertical header. Defaults to row number.

id.name

Character string, a unique ID for this plugin element. If "auto", an ID will be generated automatically from the label.

help

Character string or list of character values and XiMpLe nodes, will be used as the text value for a setting node in the .rkh file. If set to FALSE, rk.rkh.scan will ignore this node. Also needs component to be set accordingly!

component

Character string, name of the component this node belongs to. Only needed if you want to use the scan features for automatic help file generation; needs help to be set accordingly, too!

i18n

Either a character string or a named list with the optional elements context or comment, to give some i18n_context information for this node. If set to FALSE, the attribute label will be renamed into noi18n_label.

Value

An object of class XiMpLe.node.

Note

The <matrix> node was introduced with RKWard 0.6.1, please set the dependencies of your component/plugin accordingly.

See Also

and the Introduction to Writing Plugins for RKWard

Examples

test.matrix <- rk.XML.matrix("A matrix")

rkward-community/rkwarddev documentation built on May 9, 2022, 3:02 p.m.