Skip to content

Commit e04eb4f

Browse files
authored
v4.11.0 release candidate (#2443)
* v4.11.0 release candidate * Try checking with dev GGally * Accept new snaps * Skip tests with ggplot2 code that fails on old R versions * Skip more * Check workarounds * More workarounds
1 parent 7a0176d commit e04eb4f

File tree

292 files changed

+348
-309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

292 files changed

+348
-309
lines changed

DESCRIPTION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: plotly
22
Title: Create Interactive Web Graphics via 'plotly.js'
3-
Version: 4.10.4.9000
3+
Version: 4.11.0
44
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
55
email = "[email protected]", comment = c(ORCID = "0000-0002-4958-2844")),
66
person("Chris", "Parmer", role = "aut",
@@ -83,6 +83,7 @@ Encoding: UTF-8
8383
Roxygen: list(markdown = TRUE)
8484
Config/Needs/check:
8585
tidyverse/ggplot2,
86+
ggobi/GGally,
8687
rcmdcheck,
8788
devtools,
8889
reshape2,

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# plotly (development version)
1+
# plotly 4.11.0
22

33
## New features
44

demo/animation-tour-USArrests.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
# adapted from https://github.com/rstudio/ggvis/blob/master/demo/tourr.r
2-
library(tourr)
32
library(plotly)
43

54
data("USArrests")
65

6+
# Avoids R CMD check NOTE about using `tourr` without mentioning it in DESCRIPTION
7+
# Install it via CRAN `install.packages("tourr")`
8+
rescale <- getFromNamespace("rescale", "tourr")
9+
new_tour <- getFromNamespace("new_tour", "tourr")
10+
grand_tour <- getFromNamespace("grand_tour", "tourr")
11+
712
mat <- rescale(USArrests[, 1:4])
813
tour <- new_tour(mat, grand_tour(), NULL)
914

1015
# projection of each observation
1116
tour_dat <- function(step_size) {
1217
step <- tour(step_size)
13-
proj <- center(mat %*% step$proj)
18+
proj <- scale(mat %*% step$proj, center = TRUE, scale = FALSE)
1419
data.frame(x = proj[,1], y = proj[,2], state = rownames(mat))
1520
}
1621

demo/animation-tour-basic.R

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
# adapted from https://github.com/rstudio/ggvis/blob/master/demo/tourr.r
2-
library(tourr)
32
library(plotly)
43

4+
# Avoids R CMD check NOTE about using `tourr` without mentioning it in DESCRIPTION
5+
# Install it `install.packages("tourr")`
6+
rescale <- getFromNamespace("rescale", "tourr")
7+
new_tour <- getFromNamespace("new_tour", "tourr")
8+
grand_tour <- getFromNamespace("grand_tour", "tourr")
9+
lazyLoad(
10+
file.path(system.file("data", package = "tourr"), "Rdata"),
11+
filter = function(x) x == "flea"
12+
)
13+
514
mat <- rescale(as.matrix(flea[1:6]))
615
tour <- new_tour(mat, grand_tour(), NULL)
716

817
tour_dat <- function(step_size) {
918
step <- tour(step_size)
10-
proj <- center(mat %*% step$proj)
19+
proj <- scale(mat %*% step$proj, center = TRUE, scale = FALSE)
1120
data.frame(x = proj[,1], y = proj[,2],
1221
species = flea$species)
1322
}

demo/crosstalk-filter-lines.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
library(crosstalk)
22
library(ggplot2)
3-
library(gapminder)
43
library(plotly)
54

5+
# Equivalent to data(gapminder, package = "gapminder"), but avoids R CMD check NOTE
6+
# about `gapminder` not being in DESCRIPTION. Install it `install.packages("gapminder")`
7+
lazyLoad(
8+
file.path(system.file("data", package = "gapminder"), "Rdata"),
9+
filter = function(x) x == "gapminder"
10+
)
11+
612
sd <- highlight_key(gapminder)
713

814
g <- ggplot(sd, aes(year, lifeExp, color = country, group = country)) +

demo/crosstalk-highlight-leaflet.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
library(plotly)
2-
# devtools::install_github("rstudio/leaflet#346")
3-
library(leaflet)
42
library(crosstalk)
53
library(htmltools)
64

@@ -13,8 +11,11 @@ p <- plot_ly(sd, x = ~depth, y = ~mag) %>%
1311
add_markers(alpha = 0.5) %>%
1412
highlight("plotly_selected", dynamic = TRUE)
1513

16-
map <- leaflet(sd) %>%
17-
addTiles() %>%
18-
addCircles()
14+
# Requires devtools::install_github("rstudio/leaflet#346")
15+
withr::with_namespace("leaflet", {
16+
map <- leaflet(sd) %>%
17+
addTiles() %>%
18+
addCircles()
19+
})
1920

2021
bscols(p, map)

demo/sf-dt.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ map <- plot_ly(ncsd, split = ~NAME, color = I("gray"), hoveron = "fills") %>%
99
layout(title = "Click on counties to query them", showlegend = FALSE) %>%
1010
config(displayModeBar = FALSE)
1111

12-
bscols(map, DT::datatable(ncsd))
12+
datatable <- getFromNamespace("datatable", "DT")
13+
bscols(map, datatable(ncsd))

demo/sf-mapbox-data.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ plot_mapbox(res_mn, split = ~INDRESNAME, color = ~AREA, stroke = ~PERIMETER, spa
1111

1212
# linking with DT
1313
mn <- highlight_key(res_mn)
14+
datatable <- getFromNamespace("datatable", "DT")
1415
bscols(
1516
plot_mapbox(mn, split = ~INDRESNAME, text = ~INDRESNAME, hoverinfo = "text", hoveron = "fills") %>%
1617
layout(title = "Click a reservation", showlegend = FALSE),
17-
DT::datatable(mn)
18+
datatable(mn)
1819
)
1920

2021
# linking with plotly
@@ -31,5 +32,3 @@ bscols(
3132
layout(barmode = "overlay") %>%
3233
highlight("plotly_selected", persistent = TRUE)
3334
)
34-
35-

demo/sf-mapbox-layout.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
77
sf_to_geojson <- function(x) {
88
tmp <- tempfile(fileext = ".geojson")
99
st_write(x, tmp, driver = "GEOJSON")
10-
geojsonio::geojson_read(tmp, "local")
10+
geojson_read <- getFromNamespace("geojson_read", "geojsonio")
11+
geojson_read(tmp, "local")
1112
}
1213

1314
# By converting sf to geojson and routing to mapbox.layers, rendering

tests/testthat/_snaps/cookbook-axes/cookbook-axes-blank-minor-major.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-blank-minor.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-blank-x.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-blank-y.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-coord-ylim.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-custom-formatter.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-flevels.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-fonts.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-label-funs.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-linear-axes.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-log2-coord.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-log2-labels.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-log2-scale.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-no-x-title.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-scale-hide.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-scale-name.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-scale-y-log10-labels.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-scale-y-log10.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-axes/cookbook-axes-ylim-hide.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-lines/cookbook-axes-bar-dodge-color-err4.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-lines/cookbook-axes-bar-dodge-color-error.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-lines/cookbook-axes-bar-dodge-color.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-lines/cookbook-axes-bar-error-diff.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-lines/cookbook-axes-bar-error-narrow.svg

Lines changed: 1 addition & 1 deletion
Loading

tests/testthat/_snaps/cookbook-lines/cookbook-axes-bar-error-wide.svg

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)