Skip to content
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

Avoid warning in type_convert when providing non-character specs #699

Closed
wants to merge 1 commit into from

Conversation

@gergness
Copy link
Contributor

@gergness gergness commented Jul 24, 2017

Before this commit, if I use a col_spec with non-character variables in type_convert, I get a warning.

library(readr)
test <- tibble::data_frame(x = 1:3, y = "3", z = "a")
type_convert(test, col_types = cols(x = col_number()))

#> # A tibble: 3 x 3
#>       x     y     z
#>   <int> <dbl> <chr>
#> 1     1     3     a
#> 2     2     3     a
#> 3     3     3     a
#> Warning message:
#> The following named parsers don't match the column names: x 
@jimhester
Copy link
Member

@jimhester jimhester commented Jan 16, 2018

Yes, this should really be an error if you try to type convert a non-character column.

@jimhester jimhester closed this in 02af584 Nov 16, 2018
@jimhester
Copy link
Member

@jimhester jimhester commented Nov 16, 2018

Thanks for the PR!

I ended up fixing this issue somewhat differently, but this situation will no longer produce a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants