powered by
Calculate percentages of values in a matrix or table with respect to the row or column totals.
withinPC(X, rows = TRUE, rnd = 1)
A matrix or table with percentages
matrix or table
TRUE (default) to calculate by rows, or FALSE to calculate by columns
numbers of digits to round the result to
(X=matrix(c(1:12),3)) withinPC(X)
Run the code above in your browser using DataLab