Skip to content

Commit eaee4d5

Browse files
authored
v2.0.0 release tweaks (#531)
* add donttest around longer leaflet example * colors example should be donttest * reduce even more examples with \donttest * update comments with latest builds
1 parent 85479ea commit eaee4d5

13 files changed

+43
-33
lines changed

R/colors.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ colorFactor <- function(palette, domain, levels = NULL, ordered = FALSE,
260260
#' pal <- colorBin("Greens", domain = 0:100)
261261
#' pal(runif(10, 60, 100))
262262
#'
263-
#' if (interactive()) {
263+
#' \donttest{
264264
#' # Exponential distribution, mapped continuously
265265
#' previewColors(colorNumeric("Blues", domain = NULL), sort(rexp(16)))
266266
#' # Exponential distribution, mapped by interval

R/layers.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ epsg3857 <- "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y
221221
#' @template data-getMapData
222222
#'
223223
#' @examples
224-
#' library(raster)
224+
#' \donttest{library(raster)
225225
#'
226226
#' r <- raster(xmn = -2.8, xmx = -2.79, ymn = 54.04, ymx = 54.05, nrows = 30, ncols = 30)
227227
#' values(r) <- matrix(1:900, nrow(r), ncol(r), byrow = TRUE)
@@ -230,7 +230,7 @@ epsg3857 <- "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y
230230
#' if (requireNamespace("rgdal")) {
231231
#' leaflet() %>% addTiles() %>%
232232
#' addRasterImage(r, colors = "Spectral", opacity = 0.8)
233-
#' }
233+
#' }}
234234
#' @export
235235
addRasterImage <- function(
236236
map,

R/methods.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
#' @describeIn map-methods Set the view of the map (center and zoom level)
1313
#' @export
1414
#' @examples
15-
#' m <- leaflet() %>% addTiles() %>% setView(-71.0382679, 42.3489054, zoom = 18)
15+
#' \donttest{m <- leaflet() %>% addTiles() %>% setView(-71.0382679, 42.3489054, zoom = 18)
1616
#' m # the RStudio 'headquarter'
1717
#' m %>% fitBounds(-72, 40, -70, 43)
1818
#' m %>% clearBounds() # world view
19+
#' }
1920
setView <- function(map, lng, lat, zoom, options = list()) {
2021
view <- evalFormula(list(c(lat, lng), zoom, options))
2122

R/plugin-simplegraticule.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ leafletSimpleGraticuleDependencies <- function() {
2323
#' @param layerId the layer id
2424
#' @param group the name of the group this layer belongs to.
2525
#' @examples
26-
#' leaflet() %>%
26+
#' \donttest{leaflet() %>%
2727
#' addTiles() %>%
28-
#' addSimpleGraticule()
28+
#' addSimpleGraticule()}
2929
#'
3030
#' @export
3131
addSimpleGraticule <- function(

cran-comments.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Comments
22

3+
## 2018-4-20
4+
Resubmitting to avoid example execution time NOTE. Test environment outputs updated below.
5+
6+
- Barret
7+
38
## 2018-4-19
49
This submission is done by Barret Schloerke <[email protected]> on behalf of Joe Cheng <[email protected]>. Please submit any changes to be made to <[email protected]>.
510

@@ -8,61 +13,52 @@ This submission is done by Barret Schloerke <[email protected]> on behalf of Jo
813

914
## Test environments
1015
* local OS X install, R 3.4.4, --run-dontcheck
11-
* 0 errors | 0 warnings | 0 note
16+
* 0 errors | 0 warnings | 0 notes
1217
* ubuntu 12.04 (on travis-ci), R version 3.4.4 (2017-01-27)
13-
* 0 errors | 0 warnings | 0 note
18+
* 0 errors | 0 warnings | 0 notes
19+
* devtools::build_win() x86_64-w64-mingw32, R version 3.4.4 (2018-03-15)
20+
* 0 errors | 0 warnings | 0 notes
1421

1522
I believe the warning and note below are transient within r-hub.
1623
* WARNING: Conversion of "README.md" failed:
1724
* the svg at https://travis-ci.org/rstudio/leaflet.svg?branch=master exists
18-
* NOTE: checking examples:
19-
* The examples are taking a longer time only on windows and hardly any time is user or system.
2025
* NOTE: checking package dependencies
2126
* On linux... Packages suggested but not available for checking: ‘sf’ ‘rgdal’ ‘rgeos’
2227

2328
* r-hub
2429
* Platform: Windows Server 2008 R2 SP1, R-release, 32/64 bit
25-
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-530b3d51e28d4a0dae75211474df73e6
30+
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-3915b63fe8c34d99b3ad7aa4b6e94640
2631
❯ checking top-level files ... WARNING
2732
Conversion of 'README.md' failed:
2833
pandoc.exe: Could not fetch https://travis-ci.org/rstudio/leaflet.svg?branch=master
2934
no store
3035
CallStack (from HasCallStack):
3136
error, called at .\System\X509\Win32.hs:56:31 in x509-system-1.6.4-E9zvdZ6nI282vjtOPFYSd1:System.X509.Win32
32-
❯ checking examples ... NOTE
33-
Examples with CPU or elapsed time > 5s
34-
leaflet 1.26 1.7 5.33
35-
user system elapsed
36-
** found \donttest examples: check also with --run-donttest
3737

38-
0 errors ✔ | 1 warning ✖ | 1 note ✖
38+
0 errors ✔ | 1 warning ✖ | 0 notes ✔
3939

4040
* Platform: Windows Server 2008 R2 SP1, R-devel, 32/64 bit
41-
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-399d221fdf1648d5a6eb615f68abc1fa
41+
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-fb1316cbeb5f48eba08e959769a990d4
4242
❯ checking top-level files ... WARNING
4343
Conversion of 'README.md' failed:
4444
pandoc.exe: Could not fetch https://travis-ci.org/rstudio/leaflet.svg?branch=master
4545
no store
4646
CallStack (from HasCallStack):
4747
error, called at .\System\X509\Win32.hs:56:31 in x509-system-1.6.4-E9zvdZ6nI282vjtOPFYSd1:System.X509.Win32
4848

49-
❯ checking examples ... NOTE
50-
Examples with CPU or elapsed time > 5s
51-
user system elapsed
52-
leaflet 1.61 1.35 5.75
53-
** found \donttest examples: check also with --run-donttest
54-
55-
0 errors ✔ | 1 warning ✖ | 1 note ✖
49+
0 errors ✔ | 1 warning ✖ | 0 notes ✔
5650

5751
* Platform: Ubuntu Linux 16.04 LTS, R-release, GCC
58-
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-bba7e3975ec949f8ba24843bf68be6eb
52+
* checked with `_R_CHECK_FORCE_SUGGESTS_=0`
53+
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-cec4735e750d4f1ea05dca55c153a847
5954
❯ checking package dependencies ... NOTE
6055
Packages suggested but not available for checking: ‘sf’ ‘rgdal’ ‘rgeos’
6156

6257
0 errors ✔ | 0 warnings ✔ | 1 note ✖
6358

6459
* Platform: Fedora Linux, R-devel, clang, gfortran
65-
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-9178afdcb7594c9da0550ca2846bda0e
60+
* checked with `_R_CHECK_FORCE_SUGGESTS_=0`
61+
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-09d8a5861fb74ed3baa34d727f1df82b
6662
❯ checking package dependencies ... NOTE
6763
Packages suggested but not available for checking: ‘sf’ ‘rgdal’ ‘rgeos’
6864

inst/examples/leaflet.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ library(leaflet)
33
m <- leaflet() %>% addTiles()
44
m # a map with the default OSM tile layer
55

6+
\donttest{
67
# set bounds
78
m %>% fitBounds(0, 40, 10, 50)
89

@@ -156,3 +157,5 @@ m %>% addCircleMarkers(~lng, ~lat, radius = ~size,
156157
greens <- colorNumeric("Greens", domain = NULL)
157158
m %>% addCircleMarkers(~lng, ~lat, radius = ~size,
158159
color = ~greens(value), fillOpacity = 0.5)
160+
161+
}

inst/examples/legend.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ leaflet() %>% addTiles() %>% addLegend(
88
title = "An Obvious Legend"
99
)
1010

11+
\donttest{
12+
1113
# an automatic legend derived from the color palette
1214
df <- local({
1315
n <- 300; x <- rnorm(n); y <- rnorm(n)
@@ -38,3 +40,4 @@ leaflet(df) %>%
3840
transform = function(x) 100 * x
3941
), group = "circles", position = "bottomleft" ) %>%
4042
addLayersControl(overlayGroups = c("circles"))
43+
}

man/addLegend.Rd

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

man/addRasterImage.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.

man/addSimpleGraticule.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.

man/colorNumeric.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/leaflet.Rd

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

man/map-methods.Rd

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

0 commit comments

Comments
 (0)