diff --git a/R/geom-flow.r b/R/geom-flow.r index c071b64e..c2839fd4 100644 --- a/R/geom-flow.r +++ b/R/geom-flow.r @@ -102,7 +102,7 @@ GeomFlow <- ggproto( aesthetics <- intersect(.color_diff_aesthetics, names(data)) # arrange data by aesthetics for consistent (reverse) z-ordering data <- data[do.call(order, lapply( - data[, c("pair", aesthetics)], + data[, c("step", aesthetics)], function(x) factor(x, levels = unique(x)) )), ] diff --git a/R/self-adjoin.r b/R/self-adjoin.r index d45ac485..e19c5cdf 100644 --- a/R/self-adjoin.r +++ b/R/self-adjoin.r @@ -42,9 +42,9 @@ self_adjoin <- function( # self-(inner )join `link` variables by `key` and `by` adj <- dplyr::inner_join( - transform(data, pair = key_num)[, c("pair", by, link)], - transform(data, pair = key_num - 1)[, c("pair", by, link)], - by = c("pair", by), + transform(data, step = key_num)[, c("step", by, link)], + transform(data, step = key_num - 1)[, c("step", by, link)], + by = c("step", by), suffix = suffix ) @@ -52,15 +52,15 @@ self_adjoin <- function( if (!is.null(keep.x)) { adj <- dplyr::left_join( adj, - transform(data, pair = key_num)[, c("pair", by, keep.x)], - by = c("pair", by) + transform(data, step = key_num)[, c("step", by, keep.x)], + by = c("step", by) ) } if (!is.null(keep.y)) { adj <- dplyr::left_join( adj, - transform(data, pair = key_num - 1)[, c("pair", by, keep.y)], - by = c("pair", by) + transform(data, step = key_num - 1)[, c("step", by, keep.y)], + by = c("step", by) ) } diff --git a/docs/articles/ggalluvial.html b/docs/articles/ggalluvial.html index 66cc1e52..320dfd94 100644 --- a/docs/articles/ggalluvial.html +++ b/docs/articles/ggalluvial.html @@ -264,102 +264,54 @@
## Packages -----------------------------------------------------------------
-## package * version date
-## assertthat 0.2.0 2017-04-11
-## backports 1.1.2 2017-12-13
-## base * 3.3.3 2017-03-07
-## bindr 0.1.1 2018-03-13
-## bindrcpp * 0.2.2 2018-03-29
-## colorspace 1.3-2 2016-12-14
-## datasets * 3.3.3 2017-03-07
-## devtools 1.13.5 2018-02-18
-## digest 0.6.15 2018-01-28
-## dplyr 0.7.4 2017-09-28
-## evaluate 0.10.1 2017-06-24
-## ggalluvial * 0.9.0 2018-06-26
-## ggplot2 * 2.2.1.9000 2018-06-26
-## glue 1.2.0 2017-10-29
-## graphics * 3.3.3 2017-03-07
-## grDevices * 3.3.3 2017-03-07
-## grid 3.3.3 2017-03-07
-## gtable 0.2.0 2016-02-26
-## htmltools 0.3.6 2017-04-28
-## knitr 1.18 2017-12-27
-## labeling 0.3 2014-08-23
-## lazyeval 0.2.1 2017-10-29
-## magrittr 1.5 2014-11-22
-## memoise 1.1.0 2017-04-21
-## methods * 3.3.3 2017-03-07
-## munsell 0.4.3 2016-02-13
-## pillar 1.1.0 2018-01-14
-## pkgconfig 2.0.1 2017-03-21
-## plyr 1.8.4 2016-06-08
-## purrr 0.2.4 2017-10-18
-## R6 2.2.2 2017-06-17
-## RColorBrewer 1.1-2 2014-12-07
-## Rcpp 0.12.17 2018-05-18
-## rlang 0.2.0.9001 2018-06-26
-## rmarkdown 1.8 2017-11-17
-## rprojroot 1.3-2 2018-01-03
-## scales 0.5.0.9000 2018-06-18
-## stats * 3.3.3 2017-03-07
-## stringi 1.2.2 2018-05-02
-## stringr 1.2.0 2017-02-18
-## tibble 1.4.2 2018-01-22
-## tidyr 0.7.2 2017-10-16
-## tidyselect 0.2.3 2017-11-06
-## tools 3.3.3 2017-03-07
-## utils * 3.3.3 2017-03-07
-## withr 2.1.2 2018-06-26
-## yaml 2.1.19 2018-05-01
-## source
-## cran (@0.2.0)
-## CRAN (R 3.3.2)
-## local
-## CRAN (R 3.3.3)
-## CRAN (R 3.3.3)
-## CRAN (R 3.3.2)
-## local
-## CRAN (R 3.3.3)
-## CRAN (R 3.3.3)
-## CRAN (R 3.3.2)
-## CRAN (R 3.3.2)
-## local (corybrunson/ggalluvial@ca234a6)
-## Github (tidyverse/ggplot2@348b26f)
-## CRAN (R 3.3.2)
-## local
-## local
-## local
-## CRAN (R 3.3.0)
-## cran (@0.3.6)
-## CRAN (R 3.3.2)
-## CRAN (R 3.3.0)
-## cran (@0.2.1)
-## CRAN (R 3.3.0)
-## CRAN (R 3.3.2)
-## local
-## CRAN (R 3.3.0)
-## CRAN (R 3.3.3)
-## CRAN (R 3.3.2)
-## CRAN (R 3.3.0)
-## cran (@0.2.4)
-## cran (@2.2.2)
-## CRAN (R 3.3.0)
-## CRAN (R 3.3.3)
-## Github (tidyverse/rlang@ba4fb06)
-## CRAN (R 3.3.2)
-## CRAN (R 3.3.3)
-## Github (hadley/scales@4056ec3)
-## local
-## CRAN (R 3.3.3)
-## CRAN (R 3.3.2)
-## CRAN (R 3.3.3)
-## CRAN (R 3.3.2)
-## CRAN (R 3.3.2)
-## local
-## local
-## Github (jimhester/withr@fe56f20)
-## CRAN (R 3.3.3)
+## package * version date source
+## assertthat 0.2.0 2017-04-11 cran (@0.2.0)
+## backports 1.1.2 2017-12-13 CRAN (R 3.3.2)
+## base * 3.3.3 2017-03-07 local
+## bindr 0.1.1 2018-03-13 CRAN (R 3.3.3)
+## bindrcpp * 0.2.2 2018-03-29 CRAN (R 3.3.3)
+## colorspace 1.3-2 2016-12-14 CRAN (R 3.3.2)
+## datasets * 3.3.3 2017-03-07 local
+## devtools 1.13.5 2018-02-18 CRAN (R 3.3.3)
+## digest 0.6.15 2018-01-28 CRAN (R 3.3.3)
+## dplyr 0.7.4 2017-09-28 CRAN (R 3.3.2)
+## evaluate 0.10.1 2017-06-24 CRAN (R 3.3.2)
+## ggalluvial * 0.9.0 2018-06-26 local (corybrunson/ggalluvial@NA)
+## ggplot2 * 2.2.1.9000 2018-06-26 Github (tidyverse/ggplot2@348b26f)
+## glue 1.2.0 2017-10-29 CRAN (R 3.3.2)
+## graphics * 3.3.3 2017-03-07 local
+## grDevices * 3.3.3 2017-03-07 local
+## grid 3.3.3 2017-03-07 local
+## gtable 0.2.0 2016-02-26 CRAN (R 3.3.0)
+## htmltools 0.3.6 2017-04-28 cran (@0.3.6)
+## knitr 1.18 2017-12-27 CRAN (R 3.3.2)
+## labeling 0.3 2014-08-23 CRAN (R 3.3.0)
+## lazyeval 0.2.1 2017-10-29 cran (@0.2.1)
+## magrittr 1.5 2014-11-22 CRAN (R 3.3.0)
+## memoise 1.1.0 2017-04-21 CRAN (R 3.3.2)
+## methods * 3.3.3 2017-03-07 local
+## munsell 0.4.3 2016-02-13 CRAN (R 3.3.0)
+## pillar 1.1.0 2018-01-14 CRAN (R 3.3.3)
+## pkgconfig 2.0.1 2017-03-21 CRAN (R 3.3.2)
+## plyr 1.8.4 2016-06-08 CRAN (R 3.3.0)
+## purrr 0.2.4 2017-10-18 cran (@0.2.4)
+## R6 2.2.2 2017-06-17 cran (@2.2.2)
+## RColorBrewer 1.1-2 2014-12-07 CRAN (R 3.3.0)
+## Rcpp 0.12.17 2018-05-18 CRAN (R 3.3.3)
+## rlang 0.2.0.9001 2018-06-26 Github (tidyverse/rlang@ba4fb06)
+## rmarkdown 1.8 2017-11-17 CRAN (R 3.3.2)
+## rprojroot 1.3-2 2018-01-03 CRAN (R 3.3.3)
+## scales 0.5.0.9000 2018-06-18 Github (hadley/scales@4056ec3)
+## stats * 3.3.3 2017-03-07 local
+## stringi 1.2.2 2018-05-02 CRAN (R 3.3.3)
+## stringr 1.2.0 2017-02-18 CRAN (R 3.3.2)
+## tibble 1.4.2 2018-01-22 CRAN (R 3.3.3)
+## tidyr 0.7.2 2017-10-16 CRAN (R 3.3.2)
+## tidyselect 0.2.3 2017-11-06 CRAN (R 3.3.2)
+## tools 3.3.3 2017-03-07 local
+## utils * 3.3.3 2017-03-07 local
+## withr 2.1.2 2018-06-26 Github (jimhester/withr@fe56f20)
+## yaml 2.1.19 2018-05-01 CRAN (R 3.3.3)
## Packages -----------------------------------------------------------------
-## package * version date source
-## assertthat 0.2.0 2017-04-11 cran (@0.2.0)
-## backports 1.1.2 2017-12-13 CRAN (R 3.3.2)
-## base * 3.3.3 2017-03-07 local
-## bindr 0.1.1 2018-03-13 CRAN (R 3.3.3)
-## bindrcpp 0.2.2 2018-03-29 CRAN (R 3.3.3)
-## colorspace 1.3-2 2016-12-14 CRAN (R 3.3.2)
-## datasets * 3.3.3 2017-03-07 local
-## devtools 1.13.5 2018-02-18 CRAN (R 3.3.3)
-## digest 0.6.15 2018-01-28 CRAN (R 3.3.3)
-## dplyr 0.7.4 2017-09-28 CRAN (R 3.3.2)
-## evaluate 0.10.1 2017-06-24 CRAN (R 3.3.2)
-## ggalluvial * 0.9.0 2018-06-26 local (corybrunson/ggalluvial@ca234a6)
-## ggfittext 0.5.0.9003 2018-01-15 Github (wilkox/ggfittext@50021c0)
-## ggplot2 * 2.2.1.9000 2018-06-26 Github (tidyverse/ggplot2@348b26f)
-## ggrepel 0.7.0 2017-09-29 CRAN (R 3.3.2)
-## glue 1.2.0 2017-10-29 CRAN (R 3.3.2)
-## graphics * 3.3.3 2017-03-07 local
-## grDevices * 3.3.3 2017-03-07 local
-## grid 3.3.3 2017-03-07 local
-## gtable 0.2.0 2016-02-26 CRAN (R 3.3.0)
-## htmltools 0.3.6 2017-04-28 cran (@0.3.6)
-## knitr 1.18 2017-12-27 CRAN (R 3.3.2)
-## labeling 0.3 2014-08-23 CRAN (R 3.3.0)
-## lazyeval 0.2.1 2017-10-29 cran (@0.2.1)
-## magrittr 1.5 2014-11-22 CRAN (R 3.3.0)
-## memoise 1.1.0 2017-04-21 CRAN (R 3.3.2)
-## methods * 3.3.3 2017-03-07 local
-## munsell 0.4.3 2016-02-13 CRAN (R 3.3.0)
-## pillar 1.1.0 2018-01-14 CRAN (R 3.3.3)
-## pkgconfig 2.0.1 2017-03-21 CRAN (R 3.3.2)
-## plyr 1.8.4 2016-06-08 CRAN (R 3.3.0)
-## purrr 0.2.4 2017-10-18 cran (@0.2.4)
-## R6 2.2.2 2017-06-17 cran (@2.2.2)
-## Rcpp 0.12.17 2018-05-18 CRAN (R 3.3.3)
-## rlang 0.2.0.9001 2018-06-26 Github (tidyverse/rlang@ba4fb06)
-## rmarkdown 1.8 2017-11-17 CRAN (R 3.3.2)
-## rprojroot 1.3-2 2018-01-03 CRAN (R 3.3.3)
-## scales 0.5.0.9000 2018-06-18 Github (hadley/scales@4056ec3)
-## stats * 3.3.3 2017-03-07 local
-## stringi 1.2.2 2018-05-02 CRAN (R 3.3.3)
-## stringr 1.2.0 2017-02-18 CRAN (R 3.3.2)
-## tibble 1.4.2 2018-01-22 CRAN (R 3.3.3)
-## tidyr 0.7.2 2017-10-16 CRAN (R 3.3.2)
-## tidyselect 0.2.3 2017-11-06 CRAN (R 3.3.2)
-## tools 3.3.3 2017-03-07 local
-## utils * 3.3.3 2017-03-07 local
-## withr 2.1.2 2018-06-26 Github (jimhester/withr@fe56f20)
+## package * version date source
+## assertthat 0.2.0 2017-04-11 cran (@0.2.0)
+## backports 1.1.2 2017-12-13 CRAN (R 3.3.2)
+## base * 3.3.3 2017-03-07 local
+## bindr 0.1.1 2018-03-13 CRAN (R 3.3.3)
+## bindrcpp 0.2.2 2018-03-29 CRAN (R 3.3.3)
+## colorspace 1.3-2 2016-12-14 CRAN (R 3.3.2)
+## datasets * 3.3.3 2017-03-07 local
+## devtools 1.13.5 2018-02-18 CRAN (R 3.3.3)
+## digest 0.6.15 2018-01-28 CRAN (R 3.3.3)
+## dplyr 0.7.4 2017-09-28 CRAN (R 3.3.2)
+## evaluate 0.10.1 2017-06-24 CRAN (R 3.3.2)
+## ggalluvial * 0.9.0 2018-06-26 local (corybrunson/ggalluvial@NA)
+## ggfittext 0.5.0.9003 2018-01-15 Github (wilkox/ggfittext@50021c0)
+## ggplot2 * 2.2.1.9000 2018-06-26 Github (tidyverse/ggplot2@348b26f)
+## ggrepel 0.7.0 2017-09-29 CRAN (R 3.3.2)
+## glue 1.2.0 2017-10-29 CRAN (R 3.3.2)
+## graphics * 3.3.3 2017-03-07 local
+## grDevices * 3.3.3 2017-03-07 local
+## grid 3.3.3 2017-03-07 local
+## gtable 0.2.0 2016-02-26 CRAN (R 3.3.0)
+## htmltools 0.3.6 2017-04-28 cran (@0.3.6)
+## knitr 1.18 2017-12-27 CRAN (R 3.3.2)
+## labeling 0.3 2014-08-23 CRAN (R 3.3.0)
+## lazyeval 0.2.1 2017-10-29 cran (@0.2.1)
+## magrittr 1.5 2014-11-22 CRAN (R 3.3.0)
+## memoise 1.1.0 2017-04-21 CRAN (R 3.3.2)
+## methods * 3.3.3 2017-03-07 local
+## munsell 0.4.3 2016-02-13 CRAN (R 3.3.0)
+## pillar 1.1.0 2018-01-14 CRAN (R 3.3.3)
+## pkgconfig 2.0.1 2017-03-21 CRAN (R 3.3.2)
+## plyr 1.8.4 2016-06-08 CRAN (R 3.3.0)
+## purrr 0.2.4 2017-10-18 cran (@0.2.4)
+## R6 2.2.2 2017-06-17 cran (@2.2.2)
+## Rcpp 0.12.17 2018-05-18 CRAN (R 3.3.3)
+## rlang 0.2.0.9001 2018-06-26 Github (tidyverse/rlang@ba4fb06)
+## rmarkdown 1.8 2017-11-17 CRAN (R 3.3.2)
+## rprojroot 1.3-2 2018-01-03 CRAN (R 3.3.3)
+## scales 0.5.0.9000 2018-06-18 Github (hadley/scales@4056ec3)
+## stats * 3.3.3 2017-03-07 local
+## stringi 1.2.2 2018-05-02 CRAN (R 3.3.3)
+## stringr 1.2.0 2017-02-18 CRAN (R 3.3.2)
+## tibble 1.4.2 2018-01-22 CRAN (R 3.3.3)
+## tidyr 0.7.2 2017-10-16 CRAN (R 3.3.2)
+## tidyselect 0.2.3 2017-11-06 CRAN (R 3.3.2)
+## tools 3.3.3 2017-03-07 local
+## utils * 3.3.3 2017-03-07 local
+## withr 2.1.2 2018-06-26 Github (jimhester/withr@fe56f20)
## yaml 2.1.19 2018-05-01 CRAN (R 3.3.3)