-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove base map in vignette #875
Conversation
Unfortunately, there is still something strange happening with I have a trace back available, but I don't find it very informative... Quitting from lines 115-123 [unnamed-chunk-3] (tmap_vv.Rmd)
Error in grid.Call.graphics(C_raster, x$raster, x$x, x$y, x$width, x$height, :
LOGICAL() can only be applied to a 'logical', not a 'NULL'
Error:
! in callr subprocess.
Caused by error in `grid.Call.graphics(C_raster, x$raster, x$x, x$y, x$width, x$height, …`:
! LOGICAL() can only be applied to a 'logical', not a 'NULL'
ℹ See `$stdout` for standard output.
Type .Last.error to see the more details.
> .Last.error
<callr_error/rlib_error_3_0/rlib_error/error>
Error:
! in callr subprocess.
Caused by error in `grid.Call.graphics(C_raster, x$raster, x$x, x$y, x$width, x$height, …`:
! LOGICAL() can only be applied to a 'logical', not a 'NULL'
ℹ See `$stdout` for standard output.
---
Backtrace:
1. devtools::build_rmd("vignettes/tmap_vv.Rmd")
2. callr::r_safe(function(...) rmarkdown::render(...), args = list(input = path, …
3. callr:::get_result(output = out, options)
4. callr:::throw(callr_remote_error(remerr, output), parent = fix_msg(remerr[[3]]))
---
Subprocess backtrace:
1. rmarkdown::render(...)
2. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
3. knitr:::process_file(text, output)
4. xfun:::handle_error(withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), …
5. base::withCallingHandlers(expr, error = function(e) { …
6. base::withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), …
7. knitr:::process_group(group)
8. knitr:::call_block(x)
9. knitr:::block_exec(params)
10. knitr:::eng_r(options)
11. knitr:::in_input_dir(evaluate(code, envir = env, new_device = FALSE, …
12. knitr:::in_dir(input_dir(), expr)
13. local evaluate(code, envir = env, new_device = FALSE, keep_warning = if (is.numeric(options$warning)) TRUE else options$warning, …
14. evaluate::evaluate(...)
15. evaluate:::evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, …
16. base::handle(pv <- withCallingHandlers(withVisible(value_fun(ev$value, …
17. base::withCallingHandlers(withVisible(value_fun(ev$value, ev$visible)), …
18. base::withVisible(value_fun(ev$value, ev$visible))
19. local value_fun(ev$value, ev$visible)
20. local fun(x, options = options)
21. base::withVisible(knit_print(x, ...))
22. knitr::knit_print(x, ...)
23. tmap:::knit_print.tmap(x, ...)
24. tmap:::print.tmap(x, knit = TRUE, options = options, ...)
25. tmap:::step4_plot(x4, vp = vp, return.asp = return.asp, show = show, …
26. base::do.call(FUNrun, list(o = o, show = show, knit = knit, args))
27. tmap:::tmapGridRun(o = list(modes = list(plot = list(name = "Grid", …
28. base::mapply(function(gt, i) { …
29. (function (gt, i) …
30. grid::grid.draw(gt)
31. grid:::grid.draw.gTree(gt)
32. grDevices::recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
33. grid:::drawGTree(x)
34. grid::grid.draw(x$children[[i]], recording = FALSE)
35. grid:::grid.draw.gTree(x$children[[i]], recording = FALSE)
36. grDevices::recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
37. grid:::drawGTree(x)
38. grid::grid.draw(x$children[[i]], recording = FALSE)
39. grid:::grid.draw.gTree(x$children[[i]], recording = FALSE)
40. grDevices::recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
41. grid:::drawGTree(x)
42. grid::grid.draw(x$children[[i]], recording = FALSE)
43. grid:::grid.draw.grob(x$children[[i]], recording = FALSE)
44. grDevices::recordGraphics(drawGrob(x), list(x = x), getNamespace("grid"))
45. grid:::drawGrob(x)
46. grid::drawDetails(x, recording = FALSE)
47. grid:::drawDetails.rastergrob(x, recording = FALSE)
48. grid:::grid.Call.graphics(C_raster, x$raster, x$x, x$y, x$width, x$height, …
49. base::.handleSimpleError(function (e) …
50. local h(simpleError(msg, call))
51. rlang::entrace(e)
52. rlang::cnd_signal(entraced)
53. rlang:::signal_abort(cnd)
54. base::signalCondition(cnd)
55. global (function (e) … |
This old ggplot2 issue seems similar tidyverse/ggplot2#943. Was about a continuous scale and a single color . It looks like the color scale is not drawn correctly when the continuous scale uses only one color. The code below works: |
to fix CI.
I was able to isolate the issue to the call to
tm_basemap()
in the vignettte. Unfortunately, similar failures happen in examples now..