## Create a frequency table for normal distribution and
## conduct a chi-square goodness-of-fit test on this data.
## Use a sample of size of 5 times 10^5 random variates.
table <- rvgt.ftable(n=1e5,rep=5, rdist=rnorm,qdist=qnorm, mean=1,sd=2)
## Perform test
result <- rvgt.chisq(table)
## Plot result
plot(result)
Run the code above in your browser using DataLab