If you are working with larger arrays then you will find the following
faster and leaner:

   _".>boxed
5928.6 5990 5938.9 5881 5870.1 5858.4

   bigboxed=: 1e6 $ boxed
   timespacex '0". > bigboxed'
0.161143 4.29933e7

   timespacex '_ ".&> bigboxed'
0.714034 2.06763e8


On Wed, Aug 24, 2011 at 11:16 AM, james wafula <[email protected]> wrote:
> Hi,
> I read the data from a csv file and selected the column I was interested in 
> via dyadic { . Dan's technique has worked.
> Regards.
>
>
> ________________________________
> From: Tracy Harms <[email protected]>
> To: Programming forum <[email protected]>
> Sent: Wednesday, August 24, 2011 1:50 AM
> Subject: Re: [Jprogramming] Unboxing
>
> However, if you originally were working with numbers, converted those
> numbers to text in the midst of boxing, yet actually has no need for a
> textual representation, Dan's technique would not be as nice as removing the
> unnecesary conversion to text.
>
> We do not have enough context to know whether that is the case.
>
> --T
> On Aug 23, 2011 9:26 AM, "Raul Miller" <[email protected]> wrote:
>> On Tue, Aug 23, 2011 at 9:07 AM, james wafula <[email protected]> wrote:
>>> I am trying to make a list after unboxing but I am experiencing
> challenges. Is there something I am not getting right?
>>>
>>> boxed
>>> ┌───────┬───────┬───────┬───────┬───────┬───────┐
>>> │5928.60│5990.00│5938.90│5881.00│5870.10│5858.40│
>>> └───────┴───────┴───────┴───────┴───────┴───────┘
>>>    >boxed
>>> 5928.60
>>> 5990.00
>>> 5938.90
>>> 5881.00
>>> 5870.10
>>> 5858.40
>>>    ,>boxed
>>> 5928.605990.005938.905881.005870.105858.40
>>>
>>> I need to obtain:
>>> 5928.60 5990.00 5938.90 5881.00 5870.10 5858.40
>>
>> This is not just unboxing. You need to know what you have in those boxes.
>>
>> $&.> will tell you the shape of the contents, for example.
>>
>> From the looks of things, however, your boxes contain sequences of
>> characters and you want numbers. Thus, Dan Bron's suggestion is
>> probably the right answer:
>>
>> The content of each box should be turned into a number.
>>
>> --
>> Raul
>> ----------------------------------------------------------------------
>> 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

Reply via email to