Re: Pure Function within a pure function
- To: mathgroup at smc.vnet.net
- Subject: [mg59329] Re: Pure Function within a pure function
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Fri, 5 Aug 2005 01:23:23 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 8/4/05 at 2:07 AM, ggroup at sarj.ca wrote: >I'm wondering if it is possible to define a pure function within a >function, and if so, what syntax should I be using? I don't have an answer to the question above. However, >I have some data that I want to filter, say: >rawdata[[1]]= >time1 pt1-1 pt1-2 pt1-3 >time2 pt2-1 pt2-2 pt2-3 >time3 aborted! >rawdata[[2]]= >time1 pta-1 pta-2 pta-3 >time2 aborted! >I have a list of such data sets, and I want to apply a filter to >remove the "aborted" lines to each set. With a table command, this >is fairly easy: >data = Table[ >Select[rawdata[[i]],Length[#]==4&], {i,Length[rawdata]} >] >For readability (and lets face it, for pure asthetic value), I was >hoping to convert this to a function which I could map onto my >rawdata array. How about using DeleteCases[#, {___, aborted!}] & /@ rawdata -- To reply via email subtract one hundred and four