-
Notifications
You must be signed in to change notification settings - Fork 1
/
api_results-definition.Rmd
102 lines (70 loc) · 3.14 KB
/
api_results-definition.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
title: "Results Definition"
---
.r.yaml files
### (In Progress)
## Header
the results definition is a yaml file in the `jamovi/` directory, with the extension `.r.yaml`. the results definition describes the results produced by the analysis. the file is named to match the name of the analysis, but converted to lowercase. an example is `ttestis.r.yaml`:
```
---
name: TTestIS
title: Independent Samples T-Test
jrs: '1.0'
items:
- name: ...
type: ...
- name: ...
type: ...
```
property | function
-------------|-----------------------------------------
name | the name of the analysis. must correspond to the filename.
title | the title to display at the top of the results.
jrs | the `jamovi results spec`. should be '1.0'. must be wrapped in quotes to prevent it being interpretted as a number.
items | an array of results elements that make up the results. these are described in greater detail below.
## Results
each results element has the following properties:
- name
- type
- title
- visible: `true`
- clearWith: `*`
different results element types have different additional properties.
the different results element types are as follows:
### Preformatted
Preformatted represents the simplest of results elements. it is simply a block of preformattd text.
it has no additional properties.
### Table
Table is the most common result element in the results from jamovi analyses. Tables are represented as rich HTML tables in jamovi, and as nicely formatted ascii tables in an interactive R session.
properties:
property | default | description
-------------------|---------|---------------------------------------
columns | | an array of columns objects, see below
rows | `0` | an integer specifying the number of rows, or a data-binding where one row is created per element of the bound value
swapRowsColumns | `false` | whether the rows and columns should be swapped
notes | `[ ]` | an array of strings which appear as additional notes in the footnotes of the table.
#### Column
properties:
property | default | description
-------------|----------|---------------------------------------
name | | the name of the column, a string
title | | the title that appears at the top of the column
type | `number` | either `number` (aligned right), `integer` (aligned right, displayed to zero decimal places) or `text` (aligned left)
format | | (optional) a string with comma separated values; `zto`, `pvalue`
content | | (optional) the content to appear in the cells of the column.
visible | `true` | `true`, `false` or a data-binding. the column will be visible if the bound value isn't `false` or `null`
superTitle | | (optional) a title to appear above the title of the column
combineBelow | `false` | if multiple adjacent cells in the column contain the same value, they will be combined into a single cell
### Image
properties:
- width
- height
- renderFun
- requiresData
### Group
properties:
- items
### Array
properties:
- items
- template