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

all.equal(tbl_df, tbl_df) does not print newlines #1130

Closed
daattali opened this issue May 11, 2015 · 3 comments
Closed

all.equal(tbl_df, tbl_df) does not print newlines #1130

daattali opened this issue May 11, 2015 · 3 comments
Assignees
Milestone

Comments

@daattali
Copy link
Contributor

@daattali daattali commented May 11, 2015

When comparing two tbl_df objects, all their differences are listed as one continuous string without line breaks.

library(dplyr)
a <- data_frame(x = 1)
b <- data_frame(x = 2)
all.equal(a, b)

Output:

[1] "Rows in x but not y: 1Rows in y but not x: 1"

dplyr v0.4.1

@hadley
Copy link
Member

@hadley hadley commented May 19, 2015

This needs a few internal changes: BoolResult class needs to store a character vector rather than a std::string in order to return multiple differences.

@hadley hadley added this to the 0.5 milestone May 19, 2015
@romainfrancois
Copy link
Member

@romainfrancois romainfrancois commented Jul 8, 2015

It does:

> a <- data_frame( x = c(1,1,2,3,6) )
> b <- data_frame( x = c(1,2,3,4,5) )
> all.equal( a, b )
[1] "Rows in x but not y: 5Rows in y but not x: 5, 4Rows with difference occurences in x and y: 5, 4, 5, 1"

@daattali's point I guess is that it's hard to read because sentences are all stuck together.

I've added a . now.

@hadley
Copy link
Member

@hadley hadley commented Aug 26, 2015

This seems good enough for now

@hadley hadley closed this Aug 26, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jun 9, 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
3 participants