Skip to content

Commit c99bd6a

Browse files
committed
document, R CMD check fixes
1 parent cb517c1 commit c99bd6a

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

R/layers2traces.R

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ to_basic.GeomDensity2d <- function(data, prestats_data, layout, params, ...) {
261261
to_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, ...) {
271271
to_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, ...) {
281281
to_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.
568567
group2NA <- function(data) {
569568
if (!"group" %in% names(data)) return(data)
570569
poly.list <- split(data, data$group, drop = TRUE)

man/plotly_IMAGE.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plotly_POST.Rd

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

0 commit comments

Comments
 (0)