|
[Date Index]
[Thread Index]
[Author Index]
Re: Testing the Head of List Elements
- To: mathgroup at smc.vnet.net
- Subject: [mg25243] Re: Testing the Head of List Elements
- From: dkeith at sarif.com
- Date: Sun, 17 Sep 2000 04:47:21 -0400 (EDT)
- References: <8psf4k$9n1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Here is one way:
selectStrings[lst_] := Select[lst, MatchQ[#, _String] &]
Best,
David
In article <8psf4k$9n1 at smc.vnet.net>,
"Marshall Bartlett" <mgb_news at hotmail.com> wrote:
> I'm something of a newbie with Mathematica; please excuse my
ignorance.
>
> I am looking for a clever way to select elements from a list based on
their
> type (Head). Specifically, I want to extract all the elements of type
> dtring from a list of elements of different types (string, number,
> character, etc.).
>
> Any suggestions?
>
> --
> --------------------------------------------------------------
> Marshall Bartlett
> Department of Geology and Geophysics
> University of Utah
> mgb_news at hotmail.com
> --------------------------------------------------------------
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Prev by Date:
Re: Testing the Head of List Elements
Next by Date:
Re: Mapping down two lists
Previous by thread:
Re: Testing the Head of List Elements
Next by thread:
RE: Testing the Head of List Elements
|