I need to calculate frequencies, the following code I'm using is working but I need the breaks to include the ages rounded to 3 digits, so that the frequency of a given age falls into the right break/class
freqNT = NT$Age
range(freqNT)
#[1] 1.251826 6.626601
breaks_NT = seq(1, max(NT$newAge), by=0.2)
freq.cutNT = cut(freqNT, breaks=breaks_NT, right=FALSE, include.lowest = TRUE, order_result=T)
freq.freqNT = table(freq.cutNT)
freq.freqNT
freq.cutNT
cbind(freq.freqNT)
freq.freqNT
For example, I need the age 6.626601 to fall within the break [6.4,6.6] With it rounded to 6.627