clock_chart | R Documentation |
There are five types of clock charts, clock_chart()
being the simplest one.
It just shows the event times on a 24 hour clock. The lines are neither
colored, nor length modified. clock_chart_col()
is used to colorize and
clock_chart_len()
to change the length of the hands by a numeric vector.
To do both simultaneously, use clock_chart_qnt()
. To use a qualitative
variable as the criterion, use clock_chart_qlt()
.
clock_chart(data, time, Col = "black")
data |
A data frame |
time |
Time in 24 hours. The allowed time formats for these family
of charts are |
Col |
A single color name for the lines. The default is |
Change the title, subtitle or the caption of the plot with
ggplot2::labs()
.
A ggplot
object, which can be further modified
with ggplot2
functions and themes.
clock_chart_col()
, clock_chart_qnt()
, and clock_chart_qlt()
.
p1 <- clock_chart(smsclock, time) # Using package built-in data
p1 + ggplot2::labs(title = "SMS Receiving Times")
# Add clock_chart(brintcity %>% filter(Origin == "Dhaka"), time = Departure)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.