-
Notifications
You must be signed in to change notification settings - Fork 0
/
52610-tables-advanced.rmd
57 lines (28 loc) · 3.25 KB
/
52610-tables-advanced.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
# Tables - advanced{#xtables-advanced}
## Creating your table
There are three possibilties:
1. **A normal table**. You simply select the first column you want in the "rows" box and then add any others you need in the "columns" box.
2. **Compressed rows**. This happens when you select a field for your rows which is "shorter" than the actual number of rows in the table. For example [5043](https://causalmap.shinyapps.io/tokyo/?s=5043) , in the factors table you can select level_1_label. Because there are fewer of these than there are factors, the table will be "compressed" and we can choose how we want the multiple results for each row to be displayed -- here we have chosen to display all the labels, but we could also have displayed just the number of values.
![image-20220830172706445](_assets/image-20220830172706445.png)
Here, we compress the sources table just by the answer to their question on purchasing power [5044](https://causalmap.shinyapps.io/tokyo/?s=5044), and display several other columns.
![image-20220830173110732](_assets/image-20220830173110732.png)
This is the same thing, but showing just the counts in each cell: [5045](https://causalmap.shinyapps.io/tokyo/?s=5045).
![image-20220830173313874](_assets/image-20220830173313874.png)
3. **Pivot tables**. It is possible to construct pivot tables by selecting a column to pivot by: [5046](https://causalmap.shinyapps.io/tokyo/?s=5046). Again, you can fill the cells with all the values of a field you select, like source_id, or all the unique values, or the counts.
![image-20220830173540123](_assets/image-20220830173540123.png)
Pivot tables give us lots of new possibilities, like this display of closed questions: [5047](https://causalmap.shinyapps.io/tokyo/?s=5047).
![image-20220830174235089](_assets/image-20220830174235089.png)
## Print view{#xprint-view-tables}
Do you want some preformatted quotes for your report?
![chrome_lTHlwBtWAR](_assets/chrome_lTHlwBtWAR.gif){width=650}
Each table can also be shown as simple text for copying and pasting.
If you want printable quotes for your report, there is a table preset for that. Or go manually to the links table, click the 🖨️ button to display Print View, and choose the columns you want. They will be shown in the Print View in the same order. Then just copy and paste using the "Copy" button.
## Formatting your table{#xformatting-your-table}
Below all tables you will see the below buttons which allow you to format the table as you wish. The columns in table with numerical values can be presented as a heatmap. The higher the number, the darker the colour of the cell will be.
![Bottom of table screenshot](_assets/Bottom of table screenshot.jpg){width=650}
## Saving your table{#xsaving-your-table}
![image-20220913134300373](_assets/image-20220913134300373.png)
You can copy the data from the tables into your clipboard by clicking `Copy` , and then you can then paste the data in Word or Excel to create your own tables, graphs, or visualisations.
You can save your table as `CSV` or `Excel`. These buttons will export all the data in the current table.
Alternately, you can save the table as a picture or png if you prefer!
Or you can save a link to this table and share it with a colleague just as you with other [shortlinks](xsharing_view).