withinPC: Calculate Row or Column Percentages

View source: R/withinPC.R

withinPCR 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)

smallstuff documentation built on May 29, 2024, 2:19 a.m.