graph.freq {agricolae} | R Documentation |
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.
graph.freq(breaks, counts, ...)
breaks |
Class interval |
counts |
frequency |
... |
parameters hist() |
breaks |
Numeric |
counts |
Numeric |
Felipe de Mendiburu
polygon.freq
, table.freq
, stat.freq
,
intervals.freq
, sturges.freq
, join.freq
,
ojiva.freq
, normal.freq
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