Learn R Programming

userfriendlyscience (version 0.1-2)

powerHist: powerHist

Description

powerHist generates a histogram with a density curve and a normal density curve.

Usage

powerHist(vector, distributionColor = "#2222CC",
          normalColor = "#00CC00", distributionLineSize = 2,
          normalLineSize = 1, xLabel = NULL,
          yLabel = NULL, density=TRUE)

Arguments

vector
A numeric vector.
distributionColor
The colour to use for the distribution (the histogram and the density curve).
normalColor
The colour to use for the normal curve.
distributionLineSize
The line size to use for the distribution density curve.
normalLineSize
The line size to use for the normal curve.
xLabel
Label to use on x axis.
yLabel
Label to use on y axis.
density
This argument is not in use yet.

Value

  • An object, with the following elements:
  • inputThe input when the function was called.
  • intermediateThe intermediate numbers and distributions.
  • datThe dataframe used to generate the plot.
  • plotThe histogram.

Examples

Run this code
powerHist(mtcars$mpg)

Run the code above in your browser using DataLab