0

Good day,

I have the following detailed data:

here's the detailed data:

A   B   C   D   E   F   G   H   I   J   K   L   M   N   O
0   0   0   0   0    -      0   0   310318  310318  310318              
1   66  1   UGX 0   -5,999,000  0   2   0   81  101010101   Cash in Vault   45901   10101010145901  10101010145901UGX
2   66  5   UGX 0    26,962,000     0   2   0   81  101010101   Cash in Vault   45901   10101010145901  10101010145901UGX
3   66  9   UGX 0    70,338,000     0   2   0   81  101010101   Cash in Vault   45901   10101010145901  10101010145901UGX
3   66  11  USD 0    20,100,000     0   1   0   81  101010101   Cash in Vault   45901   10101010145901  10101010145901USD
4   66  21  UGX 0    212,185,700    0   2   0   81  101010101   Cash in Vault   45901   10101010145901  10101010145901UGX
5   66  22  UGX 0   -127,000    0   2   0   81  101010101   Cash in Vault   45901   10101010145901  10101010145901UGX

And I want to create a summary from it that looks like the following:

Filter D=UGX 

Row  Sum of F 
1    3,313,538,054.51 
2    658,423,934,728.79 
4    145,735,578,963.90 
5    247,847,252,882.61 

I have tried the below code and i get 'vital error"

        DetailedReport <- read.csv("Reg_detailed_data.csv", header = TRUE)
        class(DetailedReport)
        library(vcd)
        library(tables)

        tabular(D*(B+1)+1~(sum=F), data=DetailedReport)

Please assist.

Thank you in advance

Dok Mbini
  • 21
  • 2
  • 8
  • 1
    You may want to share `dput(head(DetailedReport))` and it's corresponding output. For more info refer this [link](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – Prem Jun 04 '18 at 08:38
  • 90000001045901UGX", "90000002045901UGX"), class = "factor")), .Names = c("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O"), row.names = c(NA, 6L), class = "data.frame") – Dok Mbini Jun 04 '18 at 08:56
  • 1
    @DokMbini: please edit that into the question. The code and data in the question should be executable. One row is not enough, maybe four rows is good enough. – smci Jun 04 '18 at 08:57

0 Answers0