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

Unhelpful error message if there are no columns to compare #77

Open
robne1982 opened this issue Apr 13, 2020 · 0 comments
Open

Unhelpful error message if there are no columns to compare #77

robne1982 opened this issue Apr 13, 2020 · 0 comments

Comments

@robne1982
Copy link
Collaborator

Not particularly important, but when I was working on #71 I tried to run the following

df2 <- tibble(col1 = c("cat", "dog", "mouse", "fly"))
df1 <- tibble(col1 = c("cat", "dog", "rat"))

rCompare(df1, df2, keys = "col1")

Clearly this isn't smart, as without col1, there's nothing left to compare.

However, the output isn't clear

Running rCompare...
Coercing input data to data.frame
 Error in if (nrow(DFA) == 0) { : argument is of length zero 

It would be better to catch this and output a friendly error message.

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

No branches or pull requests

3 participants