plot.queue_list {queuecomputer} | R Documentation |
ggplot2 method for output from queueing model
Description
ggplot2 method for output from queueing model
Usage
## S3 method for class 'queue_list'
plot(x, which = c(2:6), annotated = TRUE, ...)
Arguments
x |
an object of class |
which |
Numeric vector of integers from 1 to 6 which represents which plots are to be created. See examples. |
annotated |
logical, if |
... |
other parameters to be passed through to plotting functions. |
Examples
## Not run:
n_customers <- 50
arrival_rate <- 1.8
service_rate <- 1
arrivals <- cumsum(rexp(n_customers, arrival_rate))
service <- rexp(n_customers, service_rate)
queue_obj <- queue_step(arrivals, service, servers = 2)
plot(queue_obj)
library(ggplot2)
## density plots of arrival and departure times
plot(queue_obj, which = 1)
## histograms of arrival and departure times
plot(queue_obj, which = 2)
## density plots of waiting and system times
plot(queue_obj, which = 3)
## step function of queue length
plot(queue_obj, which = 4)
## line range plot of customer and server status
plot(queue_obj, which = 5)
## empirical distribution plot of arrival and departure times
plot(queue_obj, which = 6)
## End(Not run)
[Package queuecomputer version 1.2.0 Index]