Learn R Programming

nipnTK (version 0.2.0)

plot.digitPreference: plot() helper function for digitPreference() function

Description

plot() helper function for digitPreference() function

Usage

# S3 method for digitPreference
plot(x, main = "", xlab = "Final Digit", ylab = "Frequency", cex = 0.75, ...)

Value

Plotted output of digitPreference() function comparing the frequencies of the various final digits

Arguments

x

Object resulting from applying the digitPreference() function.

main

Title of plot

xlab

x-axis label; default is "Final Digit"

ylab

y-axis label; default is "Frequency"

cex

Character expansion; default is 0.75

...

Additional plot() parameters

Examples

Run this code
# Plot output of digit preference test applied to anthropometric data from a
# single state from a DHS survey in a West African country
svy <- dp.ex01
digitPreference(svy$wt, digits = 1)
plot(digitPreference(svy$wt, digits = 1))

Run the code above in your browser using DataLab