Calculate the percentage (value divided by sum of values in the row/column) for each row/column
Arguments
- x
two dimensional numeric data structure
- rowwise
if
TRUEthe percentage is calculated by row, else by column- default
default value to be used if the calculated percentage is
NA.- digits
number of digits (default: 1) to which the resulting percentages are to be rounded. Set to
NAto suppress rounding