withinPC {smallstuff} | R Documentation |
Calculate Row or Column Percentages
Description
Calculate percentages of values in a matrix or table with respect to the row or column totals.
Usage
withinPC(X, rows = TRUE, rnd = 1)
Arguments
X |
matrix or table |
rows |
TRUE (default) to calculate by rows, or FALSE to calculate by columns |
rnd |
numbers of digits to round the result to |
Value
A matrix or table with percentages
Examples
(X=matrix(c(1:12),3))
withinPC(X)
[Package smallstuff version 1.0.3 Index]