Dear all, Tried to add column margins of a sample data. The data was extracted from xtable library, it gives erroro the below, appreciated if you have any idea. Bests, head(iris) irisk<-head(iris) table<-xtable(irisk,digits=2) table2 <- xtable(addmargins(as.matrix(irisk), 2), digits = 0) Error in FUN(newX[, i], ...) : invalid 'type' (character) of argument [[alternative HTML version deleted]]