Learn R Programming

weights (version 1.1.1)

starmaker: Produce stars from p values for tables.

Description

Recodes p values to stars for use in tables.

Usage

starmaker(x, p.levels=c(.001, .01, .05, .1), symbols=c("***", "**", "*", "+"))

Value

A vector of length equal to that of x of class character.

Arguments

x

A vector of p values to be turned into stars (must be numeric).

p.levels

A vector of the maximum p value for each symbol used (p<p.level).

symbols

A vector of the symbols to be displayed for each p value.

Author

Josh Pasek, Professor of Communication & Media and Political Science at the University of Michigan (www.joshpasek.com).

Examples

Run this code
starmaker(seq(0, .15, by=.01))
cbind(p=seq(0, .15, by=.01), star=starmaker(seq(0, .15, by=.01)))

Run the code above in your browser using DataLab