我的数据格式如下:
date symbol normalized.rate
1 9/14/2018 AUD/CAD 0.370231687
2 9/15/2018 AUD/CAD 0.335662465
3 9/16/2018 AUD/CAD 0.336063656
4 9/17/2018 AUD/CAD 0.366654408
5 9/18/2018 AUD/CAD 0.416452141
6 9/19/2018 AUD/CAD 0.444167698
7 9/20/2018 AUD/CAD 0.447210057
8 9/21/2018 AUD/CAD 0.475259938
9 9/22/2018 AUD/CAD 0.486961319
10 9/23/2018 AUD/CAD 0.482782254
11 9/24/2018 AUD/CAD 0.458510247
12 9/25/2018 AUD/CAD 0.44460232
13 9/26/2018 AUD/CAD 0.49481796
14 9/27/2018 AUD/CAD 0.51036408
15 9/28/2018 AUD/CAD 0.411136371
16 9/29/2018 AUD/CAD 0.32934372
17 9/30/2018 AUD/CAD 0.321771255
18 10/1/2018 AUD/CAD 0.216341814
19 10/2/2018 AUD/CAD 0.168081977
20 10/3/2018 AUD/CAD 0.085771121
下面还有其他货币对,例如EUR / USD等。我想按表格创建一个相关矩阵。我搜索了一些资源,并尝试按日期加入自身,看起来像这样:
F1 Date Symbol Normalized.Rate F1 (pairs back.csv1) Date (Pairs Back.Csv1) Symbol (Pairs Back.Csv1) Normalized.Rate (Pairs Back.Csv1)
1 9/14/2018 AUD/CAD 0.370232 6,879 9/14/2018 ZAR/JPY 0.10887
1 9/14/2018 AUD/CAD 0.370232 6,698 9/14/2018 USD/ZAR 0.94164
1 9/14/2018 AUD/CAD 0.370232 6,517 9/14/2018 USD/TRY 0.80341
1 9/14/2018 AUD/CAD 0.370232 6,336 9/14/2018 USD/SEK 0.33269
1 9/14/2018 AUD/CAD 0.370232 6,155 9/14/2018 USD/NOK 0.17961
1 9/14/2018 AUD/CAD 0.370232 5,974 9/14/2018 USD/MXN 0.11480
1 9/14/2018 AUD/CAD 0.370232 5,793 9/14/2018 USD/JPY 0.67025
1 9/14/2018 AUD/CAD 0.370232 5,612 9/14/2018 USD/CNH 0.60293
接下来,我不知道如何制作相关矩阵。 强制字段的代码应该是什么?
在R中创建矩阵很容易,但是我不知道在tableau中创建矩阵。