graph.freq {agricolae}R Documentation

Frequency table histogram

Description

In many situations it has intervals of class defined with its respective frequencies. By means of this function, the picture of frequency is obtained and it is possible to superpose the normal distribution, polygon of frequency, Ojiva and to construct the table of complete frequency.

Usage

graph.freq(breaks, counts, ...)

Arguments

breaks Class interval
counts frequency
... parameters hist()

Value

breaks Numeric
counts Numeric

Author(s)

Felipe de Mendiburu

See Also

polygon.freq, table.freq, stat.freq, intervals.freq, sturges.freq, join.freq, ojiva.freq, normal.freq

Examples


library(agricolae)
limits <-seq(10,40,5)
frequencies <-c(2,6,8,7,3,4)
#startgraph
h<-graph.freq(limits,frequencies,col="bisque")
polygon.freq(h,col="red")
title( main="Histogram and polygon of frequency",
xlab="Classes", ylab="Frequency")
#endgraph
# Statistics
measures<-stat.freq(h)
print(measures)
# frequency table full
table.freq(h)
#startgraph
# Ojiva
ojiva.freq(h,col="red",type="b",xlab="Variable",ylab="Accumulated relative frequency")
# only frequency polygon
h<-graph.freq(limits,frequencies,border=FALSE,col=NULL)
title( main="Polygon of frequency",
xlab="Variable", ylab="Frecuency")
polygon.freq(h,col="blue")
grid(col="brown")
#endgraph

[Package agricolae version 1.0-3 Index]