.a.yaml files
the analysis definition is a yaml file in the jamovi/
directory, with the extension .a.yaml
. the analysis definition describes the analysis, the way it appears in menus, and the options it requires. the file is named to match the name of the analysis it describes, but converted to lowercase. an example is ttestis.a.yaml
:
---
name: TTestIS
title: Independent Samples T-Test
menuGroup: T-Tests
version: '1.0.0'
jas: '1.0'
options:
- name: ...
type: ...
- name: ...
type: ...
property | function |
---|---|
name | the name of the analysis. camel case. underscores are discouraged, dots are verboten. |
title | the title of the analysis in title case. |
version | the version of the analysis. should make use of semantic versioning. |
jas | the jamovi analysis spec . should be ‘1.0’. must be wrapped in quotes to prevent it being interpretted as a number. |
menuGroup | the name of the top level menu where the analysis should appear. |
menuSubgroup | (optional) places the menu entry under a subheading. |
menuTitle | (optional) the title to be used in the menu. if unspecified, then the title is used. |
menuSubtitle | (optional) additional text placed to the lower right of the menu entry. |
options | an array of options that the analysis requires. these are described in greater detail below. |
options represent the options that an analysis requires in order to run. when a jamovi module is used as an R package, they represent the arguments to the function. when used in jamovi itself, they represent the user interface (UI) options presented to the user.
each option has a name, a type, and some additional properties which are described in greater detail below.
when a value is specified by the user (either through the jamovi user interface, or through a function argument), the option checks the value and produces an error if the value is not suitable. the checks performed by each option are also detailed below.
the different option types are as follows:
Data
is used for analyses which require data (almost all of them). if used, it should be the first of the options, and should always be called data
. it has no additional properties.
- name: data
type: Data
Bool
is used for true/false values, and is typically represented in the UI as a checkbox.
false
- name: bf
type: Bool
title: Bayes factor
default: false
true
or false
Integer
is used for values which need to be whole numbers. For ‘floating point’ numbers, use Number
instead.
0
-Inf
Inf
min
and the max
Number
is used for values which need to be numeric. For whole numbers, use Integer
instead.
0.0
-Inf
Inf
- name: ciWidth
type: Number
title: Confidence level
min: 50
max: 99.9
default: 95
min
and the max
List
is used where only one of several values may be specified, and only one at a time. In the UI, these are typically represented as either a listbox, or a set of radio buttons.
<the first of options>
options
must be specified as an array of strings
Variable
is used where a variable/column from the data set needs to be specified. In the UI, these are typically represented as a ‘drop box’, where variables can be dragged and dropped.
[]
[continuous, ordinal, nominal, nominaltext]
true
false
The value of Variable
is a string (in R, a character vector of length 1) containing the assigned variable name. If nothing is assigned it has a value of null
.
rejectInf
is true)rejectMissing
is true)Variables
is used where multiple variables/columns from the data set need to be specified. In the UI, these are typically represented as a ‘drop box’, where variables can be dragged and dropped.
[]
[continuous, ordinal, nominal, nominaltext]
true
false
The value is an array of strings (in R, a character vector). If nothing is assigned to Variables
it’s value is an empty array (in R, a character vector of length 0).
rejectInf
is true)rejectMissing
is true)