|
[Date Index]
[Thread Index]
[Author Index]
Re: Re: from the list select
- To: mathgroup at smc.vnet.net
- Subject: [mg101107] Re: [mg101085] Re: [mg101048] from the list select
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Wed, 24 Jun 2009 06:32:41 -0400 (EDT)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200906220823.EAA09375@smc.vnet.net> <200906231108.HAA08460@smc.vnet.net>
- Reply-to: murray at math.umass.edu
Sorry, but I beg to differ: pattern-matching and pure functions are NOT
what complete novices are likely to think of. Or, even if they find
them in the documentation, may find them such unfamiliar ideas as to be
reluctant to try them.
Leonid Shifrin wrote:
> Hi,
>
> namedata = {{"Aardsma", "David", "P"},{"Bay", "Jason", "OF"}}
>
> Solutions:
>
> Cases[namedata, {_, _, "P"}]
>
> Select[namedata, #[[3]] === "P" &]
>
> Next time consider reading the documentation first before posting your
> question - this one is simple enough to be figured out even by a complete
> novice.
>
> Regards,
> Leonid
>
>
> On Mon, Jun 22, 2009 at 1:23 AM, terrie riley <triley4 at san.rr.com> 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: For loops with mathematica....
Next by Date:
Re: Matrix construction
Previous by thread:
Re: from the list select
Next by thread:
Re: from the list select
|