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

Joining warns too many times about incompatibilities #798

Closed
hadley opened this issue Nov 24, 2014 · 4 comments
Closed

Joining warns too many times about incompatibilities #798

hadley opened this issue Nov 24, 2014 · 4 comments
Assignees
Milestone

Comments

@hadley
Copy link
Member

@hadley hadley commented Nov 24, 2014

>     df1 <- data_frame(x = 1, y = factor("a"))
>     df2 <- data_frame(x = 2, y = factor("b"))
>     outer_join(df1, df2) %>% str()
Joining by: c("x", "y")
Classestbl_df’, ‘tbland 'data.frame':   2 obs. of  2 variables:
 $ x: num  1 2
 $ y: chr  "a" "b"
Warning messages:
1: In eval(substitute(expr), envir, enclos) :
  joining factors with different levels, coercing to character vector
2: In eval(substitute(expr), envir, enclos) :
  joining factors with different levels, coercing to character vector
3: In eval(substitute(expr), envir, enclos) :
  joining factors with different levels, coercing to character vector

Also is it possible to suppress the call (like stop("!!", call. = FALSE)? It's not useful here.

@hadley hadley added this to the 0.3.1 milestone Nov 24, 2014
@hadley
Copy link
Member Author

@hadley hadley commented Nov 26, 2014

That's better, but I'm still getting two warnings from:

df1 <- data_frame(x = 1, y = factor("a"))
df2 <- data_frame(x = 2, y = factor("b"))
full_join(df1, df2)

@hadley hadley reopened this Nov 26, 2014
romainfrancois added a commit that referenced this issue Nov 26, 2014
@romainfrancois
Copy link
Member

@romainfrancois romainfrancois commented Nov 30, 2014

Think it's fine now. Please reopen otherwise. Can we test this in testthat, e.g. expect one warning, not more ?

@hadley
Copy link
Member Author

@hadley hadley commented Dec 1, 2014

I don't think so :/

@romainfrancois
Copy link
Member

@romainfrancois romainfrancois commented Dec 1, 2014

ah nevermind. If we really wanted to test this, I guess some withCallingHandlers etc ... could do the trick, but in this instance we're good.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants