Learn R Programming

swfscMisc (version 1.6.5)

uniform.test: Uniform Distribution Test

Description

Tests whether a histogram is significantly different from a uniform distribution.

Usage

uniform.test(hist.output, B = NULL)

Value

result of chi-squared test.

Arguments

hist.output

output from a call to hist.

B

number of replicates for chi-squared permutation.

Author

Eric Archer eric.archer@noaa.gov

Examples

Run this code
x.unif <- runif(100)
uniform.test(hist(x.unif), B = 1000)
x.lnorm <- rlnorm(100)
uniform.test(hist(x.lnorm), B = 1000)

Run the code above in your browser using DataLab