library(ggplot2)
library(gridExtra)
library(flextable)
library(officer)
ActualData = c ("Open Rev.", "Revenue", "Direct Cost",
"Indirect Cost", "Total Cost", "Taxes", "Margin")
LY = c(0.0,
1079511249,
806777210.4,
161822021.7,
968956266.1,
357034,
110554982.4)
LM = c(0.0,
1244782036,
922165421.4,
185576898,
1108099353,
357034,
136682682.5)
CTM = c(0.0,
1312589822,
973687717.9,
195670590.5,
1169742397,
384088.22,
142847425.7)
FTM = c(CTM[1] - LM[1], CTM[2] - LM[2], CTM[3] - LM[3], CTM[4] - LM[4], CTM[5] - LM[5], CTM[6] - LM[6], CTM[7] - LM[7])
YTM = c(CTM[1] - LY[1], CTM[2] - LY[2], CTM[3] - LY[3], CTM[4] - LY[4], CTM[5] - LY[5], CTM[6] - LY[6], CTM[7] - LY[7])
ActualData <- format(ActualData, justify = "left")
LY <- format(LY, digits=5, nsmall=2, big.mark=",", justify = "right")
LM <- format(LM, digits=5, nsmall=2, big.mark=",", justify = "right")
CTM <- format(CTM, digits=5, nsmall=2, big.mark=",", justify = "right")
FTM <- format(FTM, digits=5, nsmall=2, big.mark=",", justify = "right")
YTM <- format(YTM, digits=5, nsmall=2, big.mark=",", justify = "right")
df.data <- data.frame(ActualData,
LY, LM, CTM, FTM, YTM)
myft <- flextable(df.data, col_keys = c("ActualData", "LY", "LM", "CTM", "FTM", "YTM") )
myft <- set_header_labels(myft, ActualData = " ")
myft <- bold(italic(myft,j=1), j=1)
myft <- bg(myft, bg = "grey", part = "header")
myft <- color(myft, color = "black", part = "header")
myft <- autofit(myft)
myft

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 24 | |
| 15 | |
| 13 | |
| 12 | |
| 11 | |
| 11 | |
| 10 | |
| 9 | |
| 8 | |
| 8 |