npc {jwutil}R Documentation

Print integers with percentage of total rounded to integer

Description

Intended for succinctly printing summary data in a scientific publication.

Usage

npc(x, n, fmt = "%d (%s)")

Arguments

x

numeric number

n

numeric total

fmt

sprintf format, default being %d (%s)

Examples

npc(1, 100)
npc(1, 1)
npc(2, 1)
npc(1.321, 7.7432)
npc(7239, 234897)
npc(-10, 1000)

[Package jwutil version 1.2.3 Index]