MathGroup Archive 2009

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

Search the Archive

Re: from the list select

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101062] Re: [mg101048] from the list select
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Tue, 23 Jun 2009 07:04:16 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200906220823.EAA09375@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

Brute force:

   where = First@Flatten@Position[Part[#, 3] & /@ namedata, "P"];
   namedata[[where]]

Pattern-matching:

   Cases[namedata, {_,_,"P"}]

terrie riley wrote:
> from this list select the person who has P in the third position
> 
> 
> namedata = {{"Aardsma", "David", "P"},{"Bay", "Jason", "OF"}}
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Two questions about modification of a matrix.
  • Next by Date: Re: Re: Number format
  • Previous by thread: Re: Re: from the list select
  • Next by thread: Re: from the list select