Union - simple question
- To: mathgroup at smc.vnet.net
- Subject: [mg49009] Union - simple question
- From: Steve Gray <stevebg at adelphia.net>
- Date: Mon, 28 Jun 2004 04:13:56 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I don't understand why Union here doesn't work. (Sort is ok.) I want Union to eliminate list items where element [[1,2]] is duplicated. In this case, the first and third are duplicated because they both have '5' there. ts = {{{1,2,3},5}, {{3,8,7},6}, {{7,8,9},5}, {{1,2,3},7}}; Sort [ts, #1[[2]] < #2[[2]] &] Union[ts, Sametest -> (#1[[2]] == #2[[2]]&)] Any help will be appreciated.
- Follow-Ups:
- Re: Union - simple question
- From: Adriano Pascoletti <pascolet@dimi.uniud.it>
- Re: Union - simple question
- From: DrBob <drbob@bigfoot.com>
- Re: Union - simple question
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Union - simple question