Closed
Description
Might be related to #991, which as I understand was fixed in v1.4.0, but bug still exists in read_table2
reprex:
#works as expected:
readr::read_table2('dummy\nvar1 var2 var3\n1 2 3\n4 5 6\n', skip = 1)
#> # A tibble: 2 x 3
#> var1 var2 var3
#> <dbl> <dbl> <dbl>
#> 1 1 2 3
#> 2 4 5 6
#fails, note the unpaired quotes after `dummy`
readr::read_table2('dummy"\nvar1 var2 var3\n1 2 3\n4 5 6\n', skip = 1)
#> Warning: Missing column names filled in: 'X1' [1]
#> # A tibble: 0 x 1
#> # ... with 1 variable: X1 <chr>
Created on 2021-02-22 by the reprex package (v1.0.0)
Base R read.table
works as expected, btw.
SessionInfo:
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] readr_1.4.0 reprex_1.0.0
loaded via a namespace (and not attached):
[1] rstudioapi_0.13 knitr_1.31 magrittr_2.0.1 hms_1.0.0 R6_2.5.0 rlang_0.4.10
[7] highr_0.8 tools_4.0.3 xfun_0.20 cli_2.3.0 clipr_0.7.1 htmltools_0.5.1.1
[13] ellipsis_0.3.1 yaml_2.2.1 assertthat_0.2.1 digest_0.6.27 tibble_3.0.6 lifecycle_1.0.0
[19] crayon_1.4.1 processx_3.4.5 callr_3.5.1 vctrs_0.3.6 fs_1.5.0 ps_1.5.0
[25] glue_1.4.2 evaluate_0.14 rmarkdown_2.6 compiler_4.0.3 pillar_1.4.7 pkgconfig_2.0.3