powered by
ddunif(x, min, max, log = FALSE) pdunif(q, min, max, lower.tail = TRUE, log.p = FALSE) qdunif(p, min, max, lower.tail = TRUE, log.p = FALSE) rdunif(n, min, max)
length(n) > 1
min == max
x <- rdunif(1e5, 1, 10) xx <- -1:11 plot(prop.table(table(x)), type = "h") lines(xx, ddunif(xx, 1, 10), col = "red") hist(pdunif(x, 1, 10)) plot(ecdf(x)) lines(xx, pdunif(xx, 1, 10), col = "red")
Run the code above in your browser using DataLab