R/dfSumStat.R

dfSumStat <-
    function         # ^ calculate row and column sums and append them
(
    x                                   # ^ data.frame
)
{
    cs <- cbind(x, Total = rowSums(x, na.rm = TRUE))
    rbind(cs, Total = colSums(cs, na.rm = TRUE))
}                              # ^ data.frame with column and row sums
michelk/logbuch.R documentation built on May 22, 2019, 9:55 p.m.