@@ -261,7 +261,7 @@ to_basic.GeomDensity2d <- function(data, prestats_data, layout, params, ...) {
261261to_basic.GeomAbline <- function (data , prestats_data , layout , params , ... ) {
262262 data <- unique(data [c(" PANEL" , " intercept" , " slope" , " group" )])
263263 data $ group <- seq_len(nrow(data ))
264- lay <- tidyr :: gather (layout , variable , x , x_min : x_max )
264+ lay <- tidyr :: gather_ (layout , " variable" , " x " , c( " x_min" , " x_max" ) )
265265 data <- merge(lay [c(" PANEL" , " x" )], data , by = " PANEL" )
266266 data $ y <- with(data , intercept + slope * x )
267267 prefix_class(data , " GeomPath" )
@@ -271,7 +271,7 @@ to_basic.GeomAbline <- function(data, prestats_data, layout, params, ...) {
271271to_basic.GeomHline <- function (data , prestats_data , layout , params , ... ) {
272272 data <- unique(data [c(" PANEL" , " yintercept" , " group" )])
273273 data $ group <- seq_len(nrow(data ))
274- lay <- tidyr :: gather (layout , variable , x , x_min : x_max )
274+ lay <- tidyr :: gather_ (layout , " variable" , " x " , c( " x_min" , " x_max" ) )
275275 data <- merge(lay [c(" PANEL" , " x" )], data , by = " PANEL" )
276276 data $ y <- data $ yintercept
277277 prefix_class(data , " GeomPath" )
@@ -281,7 +281,7 @@ to_basic.GeomHline <- function(data, prestats_data, layout, params, ...) {
281281to_basic.GeomVline <- function (data , prestats_data , layout , params , ... ) {
282282 data <- unique(data [c(" PANEL" , " xintercept" , " group" )])
283283 data $ group <- seq_len(nrow(data ))
284- lay <- tidyr :: gather (layout , variable , y , y_min : y_max )
284+ lay <- tidyr :: gather_ (layout , " variable" , " y " , c( " y_min" , " y_max" ) )
285285 data <- merge(lay [c(" PANEL" , " y" )], data , by = " PANEL" )
286286 data $ x <- data $ xintercept
287287 prefix_class(data , " GeomPath" )
@@ -558,13 +558,12 @@ geom2trace.default <- function(data, params) {
558558}
559559
560560# ---------------------------------------------------------------------------
561- # ' Utility functions
562- # ' --------------------------------------------------------------------------
563- # '
561+ # Utility functions
562+ # --------------------------------------------------------------------------
564563
565- # ' Drawing ggplot2 geoms with a group aesthetic is most efficient in
566- # ' plotly when we convert groups of things that look the same to
567- # ' vectors with NA.
564+ # Drawing ggplot2 geoms with a group aesthetic is most efficient in
565+ # plotly when we convert groups of things that look the same to
566+ # vectors with NA.
568567group2NA <- function (data ) {
569568 if (! " group" %in% names(data )) return (data )
570569 poly.list <- split(data , data $ group , drop = TRUE )
0 commit comments