powered by
Row and columns percents.
rowPcts(x, ...) colPcts(x, ...)
numerical matrix
Additional arguments for rowSums
rowSums
Calculate percents by row or column. The rowSums or colSums are stored in the Sums attribute of the result.
colSums
Sums
# NOT RUN { tmp <- matrix(1:12, 3, 4, dimnames=list(c("A","B","C"), c(letters[4:7]))) tmp rowPcts(tmp) colPcts(tmp) # }
Run the code above in your browser using DataLab