I am trying to get the intersection of two lists containing matrices in R, however I want to include very similar matrices too. For example:
a =
0.012 0.013
0.055 0.100
b =
0.013 0.013
0.055 0.100
c =
0.013 0.014
0.056 0.101
If a
is in list one, b
and c
are in list two, they should all be included in the output intersect-list. I know that all.equal
is a great function to return true
in these cases, and intersect
function returns a list of exactly same matrices found, I just don't know how to combine them to get the result I want. Thank you for looking into this.
Edit: here is a code that generates example lists of matrices: https://pastebin.com/2yK4sj8G