Skip to content

Commit 71d567b

Browse files
Thomas KnechtThomasKnecht
Thomas Knecht
authored andcommitted
Add time series example
1 parent 3a1c71f commit 71d567b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

R/position-nudgestack.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
#' This is useful if you're rotating both the plot and legend.
1414
#' @export
1515
#' @examples
16+
<<<<<<< HEAD
17+
=======
18+
#' library(dplyr)
19+
#' library(ggplot2)
20+
>>>>>>> Add time series example
1621
#' ESM <- data.frame(
1722
#' as.matrix(EuStockMarkets),
1823
#' date = as.Date(paste(1, zoo::as.yearmon(time(EuStockMarkets))),
@@ -24,7 +29,11 @@
2429
#' tidyr::gather(key = key, value = value, -date) %>%
2530
#' group_by(date, key) %>%
2631
#' summarize(value = mean(value)) %>%
32+
<<<<<<< HEAD
2733
#' filter(date >= "1995-01-01" & date < "1998-01-01")
34+
=======
35+
#' filter(date >= "1995-01-01" & date <= "1997-12-01")
36+
>>>>>>> Add time series example
2837
#'
2938
#' ggplot(data = ESM_prep, mapping = aes(x = date, y = value, fill = key)) +
3039
#' geom_col(position = position_nudgestack(x = 15))

0 commit comments

Comments
 (0)