Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
2 つの別々のベクトルがHGあり、AG2 つの異なるサッカー スコアを表しています。1 つはホーム ゴールの量で、もう 1 つはアウェイ ゴールの量です。結果が何回発生したかを数えてテーブルに入れる方法があるかどうかを知りたいです。たとえば、値が1からHG2でAGある場合、結果は1-2です。次に、このスコアが何回発生するかを調べたいと思います。
HG
AG
vector<-paste(HG,AG,sep="-") result<-data.frame(table(vector))