Description Usage Arguments Details Author(s) See Also Examples
Plots boxplot, histogram, density plot, scatter plot, line plot and prints summary statistics for date duration data.
1 2 3 4 5 6 7 | durPlot(df, start, end, group = NA, timeunit = "days", plot_type = "all",
facet = FALSE, facet.nrow = NULL, theme = NULL, other = NULL,
fill_color = "black", line_color = "black", groupcolor = TRUE,
point_size = 2, alpha = NA, binwidth = 0.5, show_legend = TRUE,
title=FALSE, title_boxplot = "Boxplot", title_histogram = "Histogram",
title_density = "Density Plot", title_scatter = "Scatter Plot",
title_line = "Line Plot")
|
df |
Data frame containing start dates, end dates and groups. |
start |
Column in df for start dates. |
end |
Column in df for end dates. |
group |
Column in df for groups. Default is NA. |
timeunit |
Unit of time to be used in plots. |
plot_type |
One of |
facet |
If TRUE, wraps plots in group facets |
facet.nrow |
Number of rows for facet wrap |
theme |
Add theme elements if needed. |
other |
Add other elements if needed. |
fill_color |
Fill color |
line_color |
Line color |
groupcolor |
If FALSE, fill_color and line_color used for all groups. Default is TRUE. |
point_size |
Point size for scatterplot |
alpha |
Color transparency [0,1] |
binwidth |
Binwidth for histogram; default 0.5. |
show_legend |
Default is TRUE |
title |
If TRUE, puts main titles for each plot |
title_boxplot |
Title for boxplot title |
title_histogram |
Title for histogram |
title_density |
Title for density plot |
title_scatter |
Title for scatter plot |
title_line |
Title for line plot |
The function also returns summary statistics for the specified date duration.
Dahee Lee
timelineS
, timelineG
, durSummary
, durCalc
1 2 3 4 5 |
Country min Qt1 median mean Qt3 max sd
1 Australia 67.19 72.16 76.26 75.72 78.98 85.71 5.30
2 China 67.41 70.09 76.06 76.44 83.38 87.56 7.14
3 France 64.02 68.16 74.48 74.89 79.10 89.37 7.59
4 Japan 69.35 75.14 77.76 77.63 80.57 85.33 4.82
5 US 62.73 72.04 76.21 75.35 79.00 85.45 5.49
Country min Qt1 median mean Qt3 max sd
1 Australia 67.19 72.16 76.26 75.72 78.98 85.71 5.30
2 China 67.41 70.09 76.06 76.44 83.38 87.56 7.14
3 France 64.02 68.16 74.48 74.89 79.10 89.37 7.59
4 Japan 69.35 75.14 77.76 77.63 80.57 85.33 4.82
5 US 62.73 72.04 76.21 75.35 79.00 85.45 5.49
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.