我試圖分析AB測試網站的數據。 我的參考點是基於experimentName =實驗1(對照版)[R相加一行包含所有行
experimentName UniquePageView UniqueFrequency NonUniqueFrequency
1 Experiment 1 459 294 359
2 Experiment 2 440 286 338
3 Experiment 3 428 273 348
我需要做的是和每一個UniquePageView,UniqueFrequency和NonUniqueFrequency行時experimentName =實驗1
例如
UniquePageView WHERE experimentName = 'Experiment 1 ' + UniquePageView WHERE experimentName = 'Experiment 2 ',
UniquePageView WHERE experimentName = 'Experiment 1 ' + UniquePageView WHERE experimentName = 'Experiment 3 '
等等等等(我能有實驗#的unlimted號) 然後做UniqueFrequency和NonUniqueFrequency相同的(我可以列無限數量的爲好)
結果預計:
experimentName UniquePageView UniqueFrequency NonUniqueFrequency Conversion Rate Pooled UniquePageView Conversion Rate Pooled UniqueFrequency Conversion Rate Pooled NonUniqueFrequency
1 Experiment 1 459 294 359 918 588 718
2 Experiment 2 440 286 338 899 580 697
3 Experiment 3 428 273 348 887 567 707
這裏是它背後的數學:
experimentName UniquePageView UniqueFrequency NonUniqueFrequency Conversion Rate Pooled UniquePageView Conversion Rate Pooled UniqueFrequency Conversion Rate Pooled NonUniqueFrequency
1 Experiment 1 459 294 359 459 + 459 294 + 294 359 + 359
2 Experiment 2 440 286 338 459 + 440 294 + 286 359 + 338
3 Experiment 3 428 273 348 459 + 428 294 + 273 359 + 348
感謝這個,但是我在看suming了第1行與其他行一樣。爲了實現你所做的,我通常使用SQLDF並運行一個查詢 - 我想最終的結果是一樣的。 –