I used this this code
outcomes_all<- round (rbind(RD_enbloc, Additional.surgery, Procedure.time,Hospital.LOS,
Negative.margin, Positive.margin,
Vertical.margin ), digits=3); outcomes_all
and I got the following results that I used them to produce the next table :
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 16 4536 0.271 0.161 0.381 96.254 0.000 0.000
[2,] 10 804 1.228 0.936 1.521 65.472 0.002 0.000
[3,] 2 63 1.232 0.681 1.783 0.000 0.831 0.000
[4,] 3 407 2.567 0.565 11.661 83.288 0.003 0.222
[5,] 3 407 0.443 0.229 0.855 0.000 0.617 0.015
[6,] 2 149 4.117 0.814 20.815 48.030 0.165 0.087
Code to remake this data:
df <- cbind(c(16, 10, 2, 3, 3, 2),
c(4536, 804, 63, 407, 407, 149),
c(0.271, 1.228, 1.232, 2.567, 0.443, 4.117),
c(0.161, 0.936, 0.681, 0.565, 0.229, 0.814),
c(0.381, 1.521, 1.783, 11.661, 0.855, 20.815),
c(96.254, 65.472, 0.000, 83.288, 0.000, 48.030),
c(0.000, 0.002, 0.831, 0.003, 0.617, 0.165),
c(0.000, 0.000, 0.000, 0.222, 0.015, 0.087))
Is there any proper way to get the final table 1 (image below) or better table 2 (image below; concatenatation of effect estimate, low and high CI columns and makning them only 2 decimals) automatically as an R output; basically rename columns and rows.
Table 1
Table 2
Any advice will be greatly appreciated.