I am not sure what you want to do but if you have a well-behaved matrix of
values in a csv file to read in then this might work faster than readcsv:

e.g. if file contents are:
  text2 =. '0,0.014648428,0.343476414,-0.105340538,1.565688588', LF,
'1,2,3,-4,5'
   text2
0,0.014648428,0.343476414,-0.105340538,1.565688588
1,2,3,-4,5

    ( [: ".;._1 ','&,);._1 LF , text2
0 0.0146484 0.343476 _0.105341 1.56569
1         2        3        _4       5

Use 1!:1 to read the file contents.

On Thu, Feb 12, 2009 at 12:33 PM, Björn Helgason <[email protected]> wrote:

> readcsv does the fix so aaa is already J array
>
> 2009/2/12 Steven Taylor <[email protected]>
>
> > Hi,
> >
> > could someone take a quick look at this csv import? What is the best way
> to
> > go about this?
> >
> > thanks,
> > Steven
> >
> > NB. the csv 'L1.csv'
> > 0,0.014648428,0.343476414,-0.105340538,1.565688588
> >  NB. end of csv
> >
> > load 'csv'
> > aaa=:readcsv jpath 'G:\J\data\l1.csv'
> >  aa=:fixcsv aaa
> >
> > |length error: fixcsv
> > |   >msk    <@chopcsv;._2 y
> >
> > a=:makenum aa
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
>
>
>
> --
> Björn Helgason, Verkfræðingur
> Fugl&Fiskur ehf,
> Þerneyjarsundi 23, Hraunborgum
> Po Box 127,801 Selfoss ,
> t-póst: [email protected]
> gsm: +3546985532
> Landslags og skrúðgarðagerð, gröfuþjónusta
> http://groups.google.com/group/J-Programming
>
>
> Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
>
> góður kennari getur stigið á tær án þess að glansinn fari af skónum
>         /|_      .-----------------------------------.
>        ,'  .\  /  | Með léttri lund verður        |
>    ,--'    _,'   | Dagurinn í dag                     |
>   /       /       | Enn betri en gærdagurinn  |
>  (   -.  |        `-----------------------------------'
>  |     ) |         (\_ _/)
>  (`-.  '--.)       (='.'=)
>  `. )----'        (")_(") ☃☠
> ----------------------------------------------------------------------
> 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