Hi
Not sure if it comes from {furrr}, {sf} or another package in between, ({future}, {vctrs} ?). Let me know if I should report elsewhere...
When plotting each row of a spatial layer ({sf} polygon object) with {ggplot2} or base plot, it works with walk but I get some errors using future_walk.
This code used to work with previous versions of the packages, but I can't give precisely the version number of the different packages, or exactly when (a few month ago ?)...
Reproducible example
library(dplyr)
#>
#> Attachement du package : 'dplyr'
#> Les objets suivants sont masqués depuis 'package:stats':
#>
#> filter, lag
#> Les objets suivants sont masqués depuis 'package:base':
#>
#> intersect, setdiff, setequal, union
library(ggplot2)
library(purrr)
library(furrr)
#> Le chargement a nécessité le package : future
library(sf)
#> Linking to GEOS 3.11.2, GDAL 3.6.2, PROJ 9.2.0; sf_use_s2() is TRUE
plan(multisession, workers = 2)
# create a {sf} layer with 2 polygons
layer <- data.frame(id = 1:2) %>%
mutate(geom = c("POINT(0 0)", "POINT(0 1)")) %>%
st_as_sf(wkt = "geom") %>%
st_buffer(0.5)
with base plot: work with walk but not future_walk
# plot and save a map of the layer d for id == i
my_plot_base <- function(i, d) {
plot(d[d$id == i, ], main = i)
}
layer %>%
pull(id) %>%
walk(my_plot_base, d = layer)
Hi Not sure if it comes from {furrr}, {sf} or another package in between, ({future}, {vctrs} ?). Let me know if I should report elsewhere...
When plotting each row of a spatial layer ({sf} polygon object) with {ggplot2} or base plot, it works with
walk
but I get some errors usingfuture_walk
.This code used to work with previous versions of the packages, but I can't give precisely the version number of the different packages, or exactly when (a few month ago ?)...
Reproducible example
with ggplot: work with
walk
but notfuture_walk
with base plot: work with
walk
but notfuture_walk
just displaying is fine
Session info (future and base)
Created on 2023-09-04 with reprex v2.0.2
Session info
``` r sessionInfo() #> R version 4.3.1 (2023-06-16 ucrt) #> Platform: x86_64-w64-mingw32/x64 (64-bit) #> Running under: Windows 10 x64 (build 19044) #> #> Matrix products: default #> #> #> locale: #> [1] LC_COLLATE=French_France.utf8 LC_CTYPE=French_France.utf8 #> [3] LC_MONETARY=French_France.utf8 LC_NUMERIC=C #> [5] LC_TIME=French_France.utf8 #> #> time zone: Europe/Paris #> tzcode source: internal #> #> attached base packages: #> [1] stats graphics grDevices utils datasets methods base #> #> other attached packages: #> [1] sf_1.0-14 furrr_0.3.1 future_1.33.0 purrr_1.0.2 ggplot2_3.4.3 #> [6] dplyr_1.1.2 #> #> loaded via a namespace (and not attached): #> [1] utf8_1.2.3 generics_0.1.3 xml2_1.3.5 class_7.3-22 #> [5] KernSmooth_2.23-21 listenv_0.9.0 digest_0.6.33 magrittr_2.0.3 #> [9] evaluate_0.21 grid_4.3.1 fastmap_1.1.1 e1071_1.7-13 #> [13] DBI_1.1.3 fansi_1.0.4 scales_1.2.1 codetools_0.2-19 #> [17] textshaping_0.3.6 cli_3.6.1 rlang_1.1.1 units_0.8-3 #> [21] parallelly_1.36.0 munsell_0.5.0 reprex_2.0.2 withr_2.5.0 #> [25] yaml_2.3.7 tools_4.3.1 parallel_4.3.1 colorspace_2.1-0 #> [29] globals_0.16.2 curl_5.0.2 vctrs_0.6.3 R6_2.5.1 #> [33] proxy_0.4-27 lifecycle_1.0.3 classInt_0.4-9 fs_1.6.3 #> [37] ragg_1.2.5 pkgconfig_2.0.3 pillar_1.9.0 gtable_0.3.4 #> [41] glue_1.6.2 Rcpp_1.0.11 systemfonts_1.0.4 highr_0.10 #> [45] xfun_0.40 tibble_3.2.1 tidyselect_1.2.0 rstudioapi_0.15.0 #> [49] knitr_1.43 farver_2.1.1 htmltools_0.5.6 rmarkdown_2.24 #> [53] compiler_4.3.1 ```