I'm running into an issue where purrr::map()
freezes or hangs. In the reprex, I'm purrring through 1:10
, which works without any issue. If I increase it to 1:100
it will freeze occasionally. If I increase it to 1:1000
it will freeze before finishing almost every time.
Here's a reprex:
library(tidyverse)
library(fs)
library(arrow)
#>
#> Attaching package: 'arrow'
#> The following object is masked from 'package:utils':
#>
#> timestamp
library(glue)
#>
#> Attaching package: 'glue'
#> The following object is masked from 'package:dplyr':
#>
#> collapse
this_dir <- dir_create('tmp')
dat <- mtcars %>% rownames_to_column()
map(1:10, function(i) {
arrow::write_feather(dat, sink = glue("{this_dir}/mtcars{i}.feather"))
}) %>% invisible()
Created on 2021-03-26 by the reprex package (v1.0.0)
I'm running into the issue in RStudio and R Console with R version 4.0.4. Here's the sessionInfo()
:
sessionInfo()
R version 4.0.4 (2021-02-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] listviewer_3.0.0 httr_1.4.2 jsonlite_1.7.2
[4] readxl_1.3.1 clipr_0.7.1 magrittr_2.0.1
[7] myfirstpackage_0.0.0.9001 janitor_2.1.0 fst_0.9.4
[10] fs_1.5.0 lubridate_1.7.10 forcats_0.5.1
[13] stringr_1.4.0 dplyr_1.0.5 purrr_0.3.4
[16] readr_1.4.0 tidyr_1.1.3 tibble_3.1.0
[19] ggplot2_3.3.3 tidyverse_1.3.0 glue_1.4.2
[22] here_1.0.1 usethis_2.0.1
loaded via a namespace (and not attached):
[1] sass_0.3.1 bit64_4.0.5 modelr_0.1.8 bslib_0.2.4 assertthat_0.2.1
[6] highr_0.8 cellranger_1.1.0 yaml_2.2.1 pillar_1.5.1 backports_1.2.1
[11] digest_0.6.27 rvest_1.0.0 snakecase_0.11.0 colorspace_2.0-0 htmltools_0.5.1.1
[16] pkgconfig_2.0.3 broom_0.7.5 haven_2.3.1 rdomo_0.1.0.1 scales_1.1.1
[21] processx_3.4.5 domoclir_0.0.0.9000 styler_1.4.0 generics_0.1.0 ellipsis_0.3.1
[26] pacman_0.5.1 withr_2.4.1 cli_2.3.1 crayon_1.4.1 evaluate_0.14
[31] ps_1.6.0 fansi_0.4.2 xml2_1.3.2 tools_4.0.4 hms_1.0.0
[36] lifecycle_1.0.0 munsell_0.5.0 reprex_1.0.0 callr_3.5.1 compiler_4.0.4
[41] jquerylib_0.1.3 tinytex_0.30 rlang_0.4.10 grid_4.0.4 rstudioapi_0.13
[46] htmlwidgets_1.5.3 rmarkdown_2.7 arrow_3.0.0 domorrr_0.0.0.9000 gtable_0.3.0
[51] DBI_1.1.1 R6_2.5.0 knitr_1.31 bit_4.0.4 utf8_1.2.1
[56] rprojroot_2.0.2 stringi_1.5.3 parallel_4.0.4 Rcpp_1.0.6 vctrs_0.3.6
[61] dbplyr_2.1.0 tidyselect_1.1.0 xfun_0.22
Anyone have any idea what the issue could be?