Learn R Programming

agricolae (version 1.0-4)

join.freq: Join class for histogram

Description

In many situations it is required to join classes because of the low frequency in the intervals. In this process, it is required to join the intervals and ad the frequencies of them.

Usage

join.freq(breaks, join)

Arguments

breaks
Class intervals
join
vector

Value

  • breaksvector numeric
  • joinnumeric

See Also

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

Examples

Run this code
library(agricolae)
data(natives)
attach(natives)
class<-sturges.freq(size)
# information of the classes
class
intervals <- class$classes
# list classes
intervals.freq(intervals)
# Table frecuency
h1<-hist(size,breaks=intervals,plot=FALSE)
table.freq(h1)
# Join classes 9,10,11 and 12 with little frequency.
inter<-join.freq(intervals,9:12) # with c(9,10,11,12) or 9:12
# new table
h2<-hist(size,breaks=inter,xlim=c(0,0.12),col="bisque")
table.freq(h2)

Run the code above in your browser using DataLab