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
Error "r_vector" when defining col_types with readr::cols() #264
Comments
The problem is loading readr before vroom, this also came up in #256, you need to use e.g. ctypes <- list(.default = "c")
ex <- vroom::vroom_example("mtcars-4.csv")
vroom::vroom(ex, col_types = ctypes)
#> # A tibble: 11 x 12
#> model mpg cyl disp hp drat wt qsec vs am gear carb
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 Datsun 710 22.8 4 108 93 3.85 2.32 18.61 1 1 4 1
#> 2 Merc 240D 24.4 4 146.7 62 3.69 3.19 20 1 0 4 2
#> 3 Merc 230 22.8 4 140.8 95 3.92 3.15 22.9 1 0 4 2
#> 4 Fiat 128 32.4 4 78.7 66 4.08 2.2 19.47 1 1 4 1
#> 5 Honda Civic 30.4 4 75.7 52 4.93 1.615 18.52 1 1 4 2
#> 6 Toyota Cor… 33.9 4 71.1 65 4.22 1.835 19.9 1 1 4 1
#> 7 Toyota Cor… 21.5 4 120.1 97 3.7 2.465 20.01 1 0 3 1
#> 8 Fiat X1-9 27.3 4 79 66 4.08 1.935 18.9 1 1 4 1
#> 9 Porsche 91… 26 4 120.3 91 4.43 2.14 16.7 0 1 5 2
#> 10 Lotus Euro… 30.4 4 95.1 113 3.77 1.513 16.9 1 1 5 2
#> 11 Volvo 142E 21.4 4 121 109 4.11 2.78 18.6 1 1 4 2 Created on 2020-09-15 by the reprex package (v0.3.0) |
Perfect, thanks! I was not aware of the Do you think it would be useful to add a comment about that here? I can make a PR if needed |
Sure, that sounds like a great idea to me. |
Hi! Thanks for this awesome package.
After upgrading to R 4.0 and reinstalling packages, this error started to appear.
Using CRAN and github versions.
Created on 2020-09-15 by the reprex package (v0.3.0)
Session info
The text was updated successfully, but these errors were encountered: