Number Option

The Number option represents a decimal (floating-point) number.

Description

In the jamovi UI, a Number option is typically represented by a TextBox. It validates that the user input is numeric and falls within the specified range.

YAML Properties

PropertyTypeDescription
namestringThe unique name of the option.
typestringMust be Number.
titlestringThe label displayed in the UI.
defaultnumberThe default value.
minnumberThe minimum allowed value (inclusive).
maxnumberThe maximum allowed value (inclusive).

R Implementation

In R, a Number option is represented as a numeric value.

Examples

1. Define in YAML

- name: ciWidth
  type: Number
  title: Confidence level
  default: 95
  min: 50
  max: 99.9

2. Implementation in R

Access the value using self$options$name:

ci_level <- self$options$ciWidth / 100