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

Trim List Indices #57

Open
brodieG opened this issue Aug 18, 2016 · 0 comments
Open

Trim List Indices #57

brodieG opened this issue Aug 18, 2016 · 0 comments
Milestone

Comments

@brodieG
Copy link
Owner

brodieG commented Aug 18, 2016

Sometimes it may be desirable to match elements that change:

> diffPrint(list(1, 1:4, 5), list(1:4, 1, 5), format="raw")
< list(1, 1..  > list(1:4,..
@@ 1,7 @@      @@ 1,7 @@    
  [[1]]          [[1]]      
< [1] 1        > [1] 1 2 3 4

  [[2]]          [[2]]      
< [1] 1 2 3 4  > [1] 1      

  [[3]]          [[3]]    

The list indices force a sub-optimal content match. Gets tricky when there are named indices that get mixed in, e.g. [[1]]$named[[2]]$also.named. Simple first step would be to trim fully numeric ones.

@brodieG brodieG added this to the 0.2 milestone Aug 18, 2016
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

1 participant