set.seed(2005)
x <- round(rnorm(1000,100,10))
xscale <- 70:130
xtab <- freqtab(x,xscale)
cov.freqtab(xtab); var(x)
yscale <- 0:36
vscale <- 0:12
ny <- freqtab(KBneat$y[,1],yscale,KBneat$y[,2],vscale)
cov.freqtab(ny); cov(KBneat$y[,1],KBneat$y[,2])
Run the code above in your browser using DataLab