Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Sorting nested list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57328] Re: Sorting nested list
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 25 May 2005 06:02:31 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <d6us0f$ivm$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

{{a, {2, 4, 1., 8, 1, 4}}, {b, {3.2, -2, -6, 
7, -7}}} /.
 l_?(VectorQ[#, NumericQ] &) :> Sort[l]

??

Regards

  Jens

"Gernot Pfanner" <pfannerg at stud.uni-graz.at> 
schrieb im Newsbeitrag 
news:d6us0f$ivm$1 at smc.vnet.net...
> Hi!
>
> Please forgive me, if this is the 100.000th 
> posting concerning sorting a
> list. But at the moment I'm pretty confused, and 
> so I ask you kindly for
> your help...
> Given something like
> {{a,{2,4,1.,...}},{b,{3.2,-2,...}}}
> How do I sort just the inner lists (i.e. e.g. 
> {2,4,1.,...}), so that my
> object finally looks like
> {{a,{1.,2,4.,...}},{b,{-2,3.2,...}}}
> In this spirit
> With thanks in advance
> Yours Gernot
> 



  • Prev by Date: Re: Applying a list of functions to a list of arguments
  • Next by Date: Re: Applying a list of functions to a list of arguments
  • Previous by thread: Re: Sorting nested list
  • Next by thread: Re: Sorting nested list