tidyverse / vroom

Fast reading of delimited files
https://vroom.r-lib.org
Other
620 stars 60 forks source link

`n_max = 0` / `col_names`: crashes R when reading from a remote connection #539

Open ramiromagno opened 3 months ago

ramiromagno commented 3 months ago

Hello fellow developers,

Here is a cute bug:

col_names <-
  c(
    "marker_id",
    "chromosome",
    "genetic_map_pos",
    "start",
    "end",
    "strand",
    "marker_symbol",
    "marker_status",
    "marker_name",
    "marker_type",
    "feature_type",
    "synonyms"
  )

# Works fine from local file
vroom::vroom(
  file = "~/dwl/mgi/MRK_List2.rpt",
  col_names = col_names,
  n_max = 0
)

# Does not work from remote connection: crashes R.
vroom::vroom(
  file = "https://www.informatics.jax.org/downloads/reports/MRK_List2.rpt",
  col_names = col_names,
  n_max = 0
)

Session info

R version 4.4.0 (2024-04-24)
Platform: x86_64-pc-linux-gnu
Running under: Arch Linux

Matrix products: default
BLAS:   /usr/lib/libblas.so.3.12.0 
LAPACK: /usr/lib/liblapack.so.3.12.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/Lisbon
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] bit_4.0.5         dplyr_1.1.4       compiler_4.4.0    crayon_1.5.2      tidyselect_1.2.1  reprex_2.1.0      stringr_1.5.1    
 [8] clipr_0.8.0       callr_3.7.6       yaml_2.3.8        fastmap_1.2.0     R6_2.5.1          pak_0.7.2         generics_0.1.3   
[15] knitr_1.46        tibble_3.2.1      R.cache_0.16.0    pillar_1.9.0      tzdb_0.4.0        R.utils_2.12.3    rlang_1.1.3      
[22] utf8_1.2.4        stringi_1.8.4     xfun_0.44         fs_1.6.4          bit64_4.0.5       cli_3.6.2         withr_3.0.0      
[29] magrittr_2.0.3    ps_1.7.6          digest_0.6.35     processx_3.8.4    vroom_1.6.5       rstudioapi_0.16.0 lifecycle_1.0.4  
[36] R.oo_1.26.0       R.methodsS3_1.8.2 vctrs_0.6.5       evaluate_0.23     glue_1.7.0        styler_1.10.3     fansi_1.0.6      
[43] rmarkdown_2.27    purrr_1.0.2       tools_4.4.0       pkgconfig_2.0.3   htmltools_0.5.8.1