Last active
November 18, 2016 02:27
-
-
Save brodieG/b6b2f048fd3d086ff23c015eb3027a8e to your computer and use it in GitHub Desktop.
Compare diffobj vs. all.equal with nested list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list.A <- list( | |
list(a=1, b=2, c=matrix(1:9, 3)), | |
letters[1:16], | |
1:100, | |
head(warpbreaks, 3) | |
) | |
list.B <- list.A | |
list.B[[1]]$a <- list() | |
list.B[[1]]$c <- list.B[[1]]$c[-1, ] | |
list.B[[2]] <- LETTERS[1:16] | |
list.B[[4]] <- head(warpbreaks, 3)[-2] | |
all.equal(list.A, list.B) | |
diffPrint(list.A, list.B) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment