position lists
- To: mathgroup at smc.vnet.net
- Subject: [mg68688] position lists
- From: "rych" <rychphd at gmail.com>
- Date: Wed, 16 Aug 2006 03:36:19 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
have In: a = {1, 1, 2, 2, 1, 4} want {{1, 2, 5}, {3, 4}, {0}, {6}}; more effectively than just In: Position[a, #] & /@ Range[4] Out: {{{1}, {2}, {5}}, {{3}, {4}}, {}, {{6}}} Ideas? Known one-liners? Thanks Igor
- Follow-Ups:
- Re: position lists
- From: János <janos.lobb@yale.edu>
- Re: position lists
- From: Sseziwa Mukasa <mukasa@jeol.com>
- Re: position lists