-
Notifications
You must be signed in to change notification settings - Fork 35
Don't include '...' to empty-dimensional matrices #174
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
Conversation
this one also has a conflict now! |
Hmm, could you please add a test to check if they’re displayed correctly? The example you gave in #141 should probably not show NAs when there’s no actual rows, if I understood correctly. |
Appreciate your guidance on what a test should look like -- the main thing I had in mind when testing is to ensure there's no warning. Beyond that, I added the simple test: expect_match(repr(m), "A04[^A]*A07") Which checks that |
Yeah, maybe just add a check that the repr string is just one line for the zero-rows column (i.e. only the headers) |
beautiful, thank you! |
Closes #141.
Finally understood the code well enough to offer this simple fix.
Crucially, we don't need to worry about
omit='both'
case because that implies both dimensions are non-empty (and, in fact, large). Also, passingNULL
torbind()
,cbind()
, just omits them, leading to the desired behavior without needing anelse
clause.