# NOT RUN {
ibinom(0.5, size = 7, prob = 0.4,)
set.seed(8675309)
ibinom(runif(10), 10, 0.3, showPMF = TRUE)
set.seed(8675309)
ibinom(runif(10), 10, 0.3, showECDF = TRUE)
set.seed(8675309)
ibinom(runif(10), 10, 0.3, showPMF = TRUE, showECDF = TRUE, sampleColor = "blue3")
set.seed(8675309)
ibinom(runif(10), 10, 0.3, showPMF = TRUE, showCDF = FALSE)
# }
# NOT RUN {
ibinom(runif(100), 10, 0.3, showPMF = TRUE, minPlotQuantile = 0.02, maxPlotQuantile = 0.98)
# }
# NOT RUN {
# plot the PMF and CDF without any variates
ibinom(NULL, 10, 0.3, showPMF = TRUE, showCDF = TRUE)
# plot CDF with inversion and PMF using show
# }
# NOT RUN {
ibinom(runif(10), 10, 0.3, show = c(1,1,0))
# }
# NOT RUN {
ibinom(runif(10), 10, 0.3, show = 6)
# plot CDF with inversion and ECDF using show, using vunif
# }
# NOT RUN {
ibinom(vunif(10), 10, 0.3, show = c(1,0,1))
# }
# NOT RUN {
ibinom(vunif(10), 10, 0.3, show = 5)
# plot CDF with inversion, PMF, and ECDF using show
# }
# NOT RUN {
ibinom(vunif(10), 10, 0.3, show = c(1,1,1))
# }
# NOT RUN {
ibinom(vunif(10), 10, 0.3, show = 7)
# plot three different CDF+PMF+ECDF horizontal displays,
# with title only on the first display
par(mfrow = c(3,3)) # 3 rows, 3 cols, filling rows before columns
set.seed(8675309)
ibinom(runif(20), 10, 0.3, show = 7, respectLayout = TRUE)
ibinom(runif(20), 10, 0.3, show = 7, respectLayout = TRUE, showTitle = FALSE)
ibinom(runif(20), 10, 0.3, show = 7, respectLayout = TRUE, showTitle = FALSE)
# }
# NOT RUN {
# display animation of all components
ibinom(runif(10), 10, 0.3, show = 7, plotDelay = 0.1)
# display animation of CDF and PMF components only
ibinom(runif(10), 10, 0.3, show = 5, plotDelay = 0.1)
# pause at each stage of inversion
ibinom(runif(10), 10, 0.3, show = 7, plotDelay = -1)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab