R数据框-行列求和方法

widgets <- c(179,153,183,153,154)
gadgets <- c(167,193,190,161,181)
thingys <- c(182,166,170,171,186)
daily.prod <- data.frame(widgets,gadgets,thingys,row.names = c('Mon','Tue','Wed','Thu','Fri'))
rbind(daily.prod,Total=colSums(daily.prod))
cbind(daily.prod,Totol=rowSums(daily.prod))