Skip to contents

Calculate the percentage (value divided by sum of values in the row/column) for each row/column

Usage

rowOrColumnwisePercentage(x, rowwise, default = 0, digits = 1)

Arguments

x

two dimensional numeric data structure

rowwise

if TRUE the 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 NA to suppress rounding