Here are a couple other examples:
NB. Convert years to a flat list of numbers
birthYears=. , L:0 (> ". each ((colIdx <'birthYear') {"1 data))
NB. Find players born between 1930 and 1950 named Hank
(I. (birthYears > 1930) * (birthYears < 1950) * (names = <'Hank')) { data
NB. Find players born between 1930 and 1950 named Hank or Tommie
(I. (birthYears > 1930) * (birthYears < 1950) * ( (names = <'Hank') +
(names = <'Tommie'))) { data
NB. http://www.jsoftware.com/jwiki/Essays/DataStructures
diff=: -. [
intersect=: e. # [
union=: ~.@,
in=: ] ([: I. =)~ [: < [ NB. 4 : '(<x) ([: I. =) y'
inT=: 4 : 'x in (colIdx <y) {"1 data'
NB. Another style
NB. Hank or Tommie - the union of indices
(('Hank' inT 'nameFirst') union ('Tommie' inT 'nameFirst')) { data
NB. Hank or Tommie AND born in Cuba
((('Hank' inT 'nameFirst') union ('Tommie' inT 'nameFirst')) intersect
('Cuba' inT 'birthCountry')) { data
On Tue, Oct 8, 2013 at 3:50 AM, R.E. Boss <[email protected]> wrote:
> So 'data' was plural?
>
>
> R.E. Boss
>
> (Add your info to http://www.jsoftware.com/jwiki/Community/Demographics )
>
>
> > -----Original Message-----
> > From: [email protected] [mailto:programming-
> > [email protected]] On Behalf Of Henry Rich
> > Sent: dinsdag 8 oktober 2013 3:52
> > To: [email protected]
> > Subject: Re: [Jprogramming] Slicing and dicing tables
> >
> > That is what he meant, but it's a minority opinion.
> >
> > Henry Rich
> >
> > On 10/7/2013 8:56 PM, Dan Bron wrote:
> > > You mean " 'data' is plural " .
> > >
> > > -Dan
> > >
> > > PS: http://en.m.wikipedia.org/wiki/Muphry's_law
> > >
> > > (Yes, that link is spelled correctly :)
> > >
> > > Please excuse typos; composed on a handheld device.
> > >
> > > On Oct 7, 2013, at 8:00 PM, Eldon Eller <[email protected]> wrote:
> > >
> > >> Data are plural.
> > >>
> > >> On 10/07/2013 02:04 PM, Dan Bron wrote:
> > >>> Ganesh Rapolu
> > >>>> Because the data is boxed, all comparisons must be boxed.
> > >>> This was very well put (one short sentence which both clarifies the
> > >>> problem and justifies the solution).
> > >>>
> > >>> -Dan
> > >>>
> > >>>
> > >>>
> > >>> --------------------------------------------------------------------
> > >>> -- For information about J forums see
> > >>> http://www.jsoftware.com/forums.htm
> > >>
> > >> ---------------------------------------------------------------------
> > >> - For information about J forums see
> > >> http://www.jsoftware.com/forums.htm
> > > ----------------------------------------------------------------------
> > > For information about J forums see
> > http://www.jsoftware.com/forums.htm
> > >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm