Name of member Allowance Type Expenditure Type Date Amount, £
Adam Afriyie Office running costs (IEP/AOE) Incidentals 07/03/2009 111.09
Adam Afriyie Office running costs (IEP/AOE) Incidentals 11/05/2009 111.09
Adam Afriyie Office running costs (IEP/AOE) Incidentals 11/05/2009 51.75
Adam Holloway Office running costs (IEP/AOE) Incidentals 10/01/2009 35
Adam Holloway Office running costs (IEP/AOE) Incidentals 10/01/2009 413.23
Adam Holloway Office running costs (IEP/AOE) Incidentals 10/01/2009 9.55
Adam Holloway Office running costs (IEP/AOE IT equipment 07/03/2009 890.01
Adam Holloway Communications Expenditure Publications 12/04/2009 1774
Adam Holloway Office running costs (IEP/AOE) Incidentals 12/08/2009 1.1
Adam Holloway Office running costs (IEP/AOE Incidentals 12/08/2009 64.31
Adam Holloway Office running costs (IEP/AOE) Incidentals 12/08/2009 64.31
こんにちは、R とプログラミングは初めてです。これは、特定の期間中の MP の経費のサブセットです。各 MP の費用を小計したいので、別の投稿のコードを使用しました
> aggregate(cbind(bsent, breturn, tsent, treturn, csales) ~ yname, data = foo,
+ FUN = sum)
自分の状況に合わせて編集しました。
私のコード:
expenses2 <- aggregate(cbind(Amount..Â.) ~ Name.of.member, data = expenses, FUN = sum)
このコードは何らかの集計を行いますが、数値は一致しません。たとえば、Adam Afriyie の支出は 273.93 ポンドであると計算できますが、このコードの結果は 12697 です。この数字が何を表しているのかわかりません。誰かが私を助けて、私が間違っていることを教えてもらえますか??
前もって感謝します