freqOrdPlot: freqOrdPlot

Description Usage Arguments Value Examples

View source: R/freqOrdPlot.R

Description

freqOrdPlot takes as input a data.frame object dfData, a column name dfColName, a character string (main) for the overall title of the plot, a character string for the x-axis label, and returns a plot of the empirical cumulative frequency distribution of the data in column dfColName of dfData considering the length of dfColName as total population. It also provides an option to add horizontal and vertical lines by specifying the parameters ablineH and ablineV respectively.

Usage

1
2
3
4
5
6
7
8
9
freqOrdPlot(
  dfData,
  dfColName,
  main = dfColName,
  xlab = "",
  ablineV = NULL,
  ablineH = NULL,
  ...
)

Arguments

dfData

a data.frame object.

dfColName

a string indicating the name of the column to plot.

main

a character string indicating an overall title for the plot. If not specified then the column name is used as the title.

xlab

a character string indicating a label for the x-axis.

ablineV

a number indicating the x-coordinate of a vertical line (i.e. parallel to the y-axis) to be added to the cumulative distribution plot. The number should be within the range of values that column dfColName of dfData takes.

ablineH

a number between 0.0 and 1.0 indicating the y-coordinate of a horizontal line (i.e. parallel to the x-axis) to be added to the cumulative distribution plot.

Value

freqOrdPlot returns a plot of the empirical cumulative frequency distribution of the data in column dfColName of dfData considering the length of dfColName as total population. It also provides an option to add horizontal and vertical lines by specifying the parameters ablineH and ablineV respectively.

Examples

1
2
3
freqOrdPlot(iris,"Sepal.Length")
freqOrdPlot(iris,"Sepal.Width")
freqOrdPlot(iris,"Sepal.Length",,,,0.7)

lwTools/agriTrf documentation built on March 26, 2020, 12:09 a.m.