Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
要在R中显示客户频率日期和绘图图吗_R_Graph_Plot_Pivot - Fatal编程技术网

要在R中显示客户频率日期和绘图图吗

要在R中显示客户频率日期和绘图图吗,r,graph,plot,pivot,R,Graph,Plot,Pivot,下面是我的数据,我想得到这种类型的数据 我的数据: Cohort JoinDate RenewDate PurchaseValue c10231 01-01-2014 01-01-2014 30007 c10232 02-01-2014 02-01-2014 364 c10233 04-01-2014 04-01-2014 14952 c10233 04-01-2014 04-01-2014 18869 c10234 05-01-2014 05-01-20

下面是我的数据,我想得到这种类型的数据

我的数据:

Cohort  JoinDate    RenewDate   PurchaseValue
c10231  01-01-2014  01-01-2014  30007
c10232  02-01-2014  02-01-2014  364
c10233  04-01-2014  04-01-2014  14952
c10233  04-01-2014  04-01-2014  18869
c10234  05-01-2014  05-01-2014  30558
c10235  01-02-2014  01-02-2014  18514
c10237  01-02-2014  01-02-2014  7245
c10231  01-01-2014  01-02-2014  24064
c10232  02-01-2014  03-02-2014  25846
c10236  05-02-2014  05-02-2014  30626
c10234  05-01-2014  05-02-2014  5560
c10233  04-01-2014  05-02-2014  17121
c10237  01-02-2014  01-03-2014  29633
c10231  01-01-2014  01-03-2014  9352
c10238  02-03-2014  02-03-2014  27463
c10232  02-01-2014  02-03-2014  12510
输出:

Count of Cohort Column Labels                           
            Jan                             Feb  Mar            Grand Total
Row Labels  01-Jan  02-Jan  04-Jan  05-Jan       01-Mar 02-Mar  
       Jan       1       1       2       1    4       1      1           11
       Feb                                    3       1                   4
       Mar                                                   1            1
Grand Total      1       1       2       1    7       2      2           16
我希望R脚本显示数据,如下面提到的数据所示——数据是队列的频率。我在Excel中使用了透视表,但我想要与R中相同的输出

列数据-->连接日期行日期-->更新日期值-->频率(队列)

我希望r脚本获得如上所述的输出。如果您向我们展示您迄今为止所做的尝试,我们可以帮助您找出如何执行您不知道如何执行的操作。