I have the following two lists
l1 = {{{2011, 3, 13}, 1}, {{2011, 3, 14}, 1}, {{2011, 3, 15}, 1}, {{2011, 3, 16}, 2}, {{2011, 3, 17}, 3}}; l2 = {{{2011, 3, 13}, 40}, {{2011, 3, 16}, 50}, {{2011, 3, 17}, 60}};
and I need to extract items from l2 whose date (the first element of each l2 element) matches dates in l1 (so as to produce two lists of exactly the same length)
I don't see why something like:
Select[l1, MemberQ[Transpose[l2][[1]], #[[1]]]]
should produce an empty list. Am I missing something trivial?