Skip to content

Commit 8848fd9

Browse files
committed
Use tsbox for converting ts object to tibble
1 parent 28640d5 commit 8848fd9

File tree

5 files changed

+165
-180
lines changed

5 files changed

+165
-180
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Suggests:
5656
svglite (>= 1.2.0.9001),
5757
testthat (>= 2.1.0),
5858
vdiffr (>= 0.3.0),
59-
zoo
59+
tsbox
6060
Enhances: sp
6161
License: GPL-2 | file LICENSE
6262
URL: http://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2

R/position-nudgestack.R

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,14 @@
1313
#' This is useful if you're rotating both the plot and legend.
1414
#' @export
1515
#' @examples
16-
#' ESM <- data.frame(
17-
#' as.matrix(EuStockMarkets),
18-
#' date = as.Date(paste(1, zoo::as.yearmon(time(EuStockMarkets))),
19-
#' format = "%d %b %Y"
20-
#' )
21-
#' )
16+
#' ESM <- tsbox::ts_tbl(EuStockMarkets)
2217
#'
2318
#' ESM_prep <- ESM %>%
2419
#' tidyr::gather(key = key, value = value, -date) %>%
2520
#' group_by(date, key) %>%
2621
#' filter(date >= "1995-01-01" & date < "1998-01-01")
2722
#'
28-
#' ggplot(data = ESM_prep, mapping = aes(x = date, y = value, fill = key)) +
23+
#' ggplot(data = ESM_prep, mapping = aes(x = time, y = value, fill = id)) +
2924
#' geom_col(position = position_nudgestack(x = 15))
3025
position_nudgestack <- function(x = 0, y = 0, vjust = 1, reverse = FALSE) {
3126
ggproto(NULL, PositionNudgeStack,

man/position_nudgestack.Rd

Lines changed: 2 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)