Understanding the adverb /. is key here.

names =. index {"1 data
({. , <@#)/.~ names


On Mon, Oct 7, 2013 at 11:41 AM, Dan Farmer <[email protected]> wrote:

> I hope you guys won't mind me extending this question, but just
> playing around with that data I got to thinking. Ok, I know there are
> 398 Joe's in here.
>
> What is the distribution of names like? Taking off from Ganesh's example
>
> NB. How many total?
>
>    #(index {"1 data )
>
> 18125
>
> NB. How many unique names?
>
>    #~. (index {"1 data )
>
> 2209
>
> Ok, now if I wanted to get counts for each name, I want to connect the
> names from ~. (index {"1 data ) to the counting phrase Ganesh
> provided:
>
> +/@:= index {"1 data -- but not sure how...?
>
> -Dan
>
> On Mon, Oct 7, 2013 at 2:04 PM, Dan Bron <[email protected]> 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

Reply via email to