I have a list whose elements consist of a date object followed by several integers:
lis1 = {{desiredDate, 1, 2}, {desiredDate, 3, 4}, {desiredDate, 5, 6}, {desiredDate, 7, 8}};
I have a similarly structured list with dates that may extend from one to four days before desiredDate:
lis2 = {{undesiredDate, 1, 2},{undesiredDate, 5, 6}}
I would like to remove from lis1 all elements where the non-date elements of lis2 match, to give:
res = {desiredDate, 3, 4},{desiredDate, 7, 8}}
Thanks for ideas on how to do this.
Select[lis1, ! MemberQ[Rest /@ lis2, Rest[#]] &]
$\endgroup$