Learn R Programming

WordPools (version 1.2.0)

plotDensity: Enhanced density plot for WordPools

Description

Plots the distribution of a variable with a density estimate and a rug plot

Usage

plotDensity(
  data,
  var,
  adjust = 1,
  lwd = 2,
  fill = rgb(1, 0, 0, 0.2),
  xlab = NULL,
  main = NULL,
  anno = FALSE,
  ...
)

Value

Returns the result of density

Arguments

data

A data.frame

var

Name of the variable to be plotted

adjust

Adjustment factor for the bandwidth of the density estimate

lwd

line width

fill

Color to fill the area under the density estimate

xlab

Label for the variable

main

Title for plot

anno

If TRUE

...

Other arguments passed to plot.density

Examples

Run this code
plotDensity(Paivio, "imagery", anno=TRUE)
plotDensity(Paivio, "imagery", anno=TRUE, adjust=1.5)
plotDensity(Paivio, "syl")

plotDensity(TWP, "imagery", anno=TRUE)

Run the code above in your browser using DataLab