Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Select All Lists Where Any Element is a Given Value

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96601] Re: [mg96586] Select All Lists Where Any Element is a Given Value
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Tue, 17 Feb 2009 06:24:08 -0500 (EST)
  • References: <200902162140.QAA16030@smc.vnet.net>
  • Reply-to: drmajorbob at longhorns.com

X = {{1, 2, 3}, {8, NA, 20}, {-7, 9, NA}};
Select[X, ! FreeQ[#, NA] &]

{{8, NA, 20}, {-7, 9, NA}}

Bobby

On Mon, 16 Feb 2009 15:40:47 -0600, Gregory Lypny  
<gregory.lypny at videotron.ca> wrote:

> Hello everyone,
>
> Suppose I have the list
>
> 	X = {{1, 2, 3}, {8, NA, 20}, {-7, 9, NA}},
>
> where NA is a string, although it need not be.  How can I use Select
> to pull out all lists in X where NA appears in any element?  In this
> example, I want to pull out the second and third list.
>
> 		Regards,
>
> 			Gregory
> 		
>



-- 
DrMajorBob at longhorns.com


  • Prev by Date: Re: Mathematica, ARPACK and implicit matrices
  • Next by Date: FourierTrigSeries[] and user-defined function
  • Previous by thread: Select All Lists Where Any Element is a Given Value
  • Next by thread: Re: Select All Lists Where Any Element is a Given Value