我想知道如何使用包中的逗号qpvt
和qhpvt
函数显示数字pivottabler
R
。
library(pivottabler)
qpvt(bhmtrains, "TOC", "TrainCategory", "n()")
Express Passenger Ordinary Passenger Total
Arriva Trains Wales 3079 830 3909
CrossCountry 22865 63 22928
London Midland 14487 33792 48279
Virgin Trains 8594 8594
Total 49025 34685 83710
qhpvt(bhmtrains, "TOC", "TrainCategory", "n()")