ptable: Faster 'prop.table(table())'

View source: R/ptable.R

ptableR Documentation

Faster prop.table(table())

Description

Wrapper for table() and prop.table(). Returns APA compliant percentage values from table data.

Usage

ptable(object, percent = TRUE, sort = TRUE, ...)

Arguments

object

An object to tabulate.

percent

logical. Return rounded percentage.

sort

logical. Return sorted table.

...

Other arguments passed to table.

Value

ptable() returns a contingency table, an object of class "table", an array of integer values. See table.

Examples

ptable(c(1,1,1,2,2,3), percent=FALSE, sort=TRUE, useNA='always')


Kudusch/ktools documentation built on Oct. 30, 2022, 10:13 p.m.