Learn R Programming

QuantPsyc (version 1.5)

plotNorm: Normal Density Plot

Description

Plots the density distribution of 'x' (e.g., smoothed histogram) with an overlaying normal density plot with the same mean and SD. This is useful for 'seeing' the degree of deviance from normality.

Usage

plotNormX(x) plotNormXm(x, im)

Arguments

x
any data object such as a column(s) or variable(s) from a data.frame
im
number of items in x-multivariate to be plotted

Value

A graph of density of x.

Details

plotNormX is useful for single use (univariate) objects, but plotNormXm is more useful for creating multiple graphs (i.e., multivariate) as in sending graphs to a postcript or pdf device. See examples below.

See Also

eda.uni

Examples

Run this code
#	plot.normX	
data(USJudgeRatings)	# data packaged with R
plotNormX(USJudgeRatings$CONT) 

# creates a pdf file that contains plots for all 12 variables in USJudgeRatings

#	plot.normXm	
data(USJudgeRatings)	
pdf("Judge.pdf")	#writes file to working directory 
plotNormXm(USJudgeRatings, 12) 
dev.off()

Run the code above in your browser using DataLab