The zero at the end is there for a different reason ( _&".) ;._2 T _ _ _ _ _ _ _ _ 9065 134.7 67.3 2.3 0 _ _ _ _ _ _ _ _ _ 12012 158.9 75.6 3.1 _ _ _ _ _ _ _ _ 15055 198.6 75.8 2.8 0 _ _ _ _ _ _ _ _ _ 16687 238.9 69.8 2.8 _ _ _ _ _ _ _ _ 9801 117.1 83.7 3.4 0
(_4 {. _&".) ;._2 T 9065 134.7 67.3 2.3 12012 158.9 75.6 3.1 15055 198.6 75.8 2.8 16687 238.9 69.8 2.8 9801 117.1 83.7 3.4 I still think it is good to come up with this solution 2010/12/20 Marshall Lochbaum <mlochb...@raleighcharterhs.org> > The 0 is just fill: > > ,. ([: < 0&".) ;._2 T > ┌──────────────────────────────────────┐ > │0 0 0 0 0 0 0 0 9065 134.7 67.3 2.3 │ > ├──────────────────────────────────────┤ > │0 0 0 0 0 0 0 0 0 12012 158.9 75.6 3.1│ > ├──────────────────────────────────────┤ > │0 0 0 0 0 0 0 0 15055 198.6 75.8 2.8 │ > ├──────────────────────────────────────┤ > │0 0 0 0 0 0 0 0 0 16687 238.9 69.8 2.8│ > ├──────────────────────────────────────┤ > │0 0 0 0 0 0 0 0 9801 117.1 83.7 3.4 │ > └──────────────────────────────────────┘ > > Another option is to remove all the 0s after execution with -. : > > (0 -.~ 0&".) ;._2 T > 9065 134.7 67.3 2.3 > 12012 158.9 75.6 3.1 > 15055 198.6 75.8 2.8 > 16687 238.9 69.8 2.8 > 9801 117.1 83.7 3.4 > > For this you might want to use _ in case there are zeros in the data. > > Marshall > > -----Original Message----- > From: programming-boun...@jsoftware.com [mailto: > programming-boun...@jsoftware.com] On Behalf Of Björn Helgason > Sent: Monday, December 20, 2010 4:50 AM > To: Programming forum > Subject: Re: [Jprogramming] Extracting data from a text > > This is brilliant! > > Would be interesting to note how you thought it out. > > Especially because an ordinary split leaves an extra 0 at the end in some > of > the lines. > > ( 0&".) ;._2 T > 0 0 0 0 0 0 0 0 9065 134.7 67.3 2.3 0 > 0 0 0 0 0 0 0 0 0 12012 158.9 75.6 3.1 > 0 0 0 0 0 0 0 0 15055 198.6 75.8 2.8 0 > 0 0 0 0 0 0 0 0 0 16687 238.9 69.8 2.8 > 0 0 0 0 0 0 0 0 9801 117.1 83.7 3.4 0 > > > 2010/12/19 Tikkanz <tikk...@gmail.com> > > > Something like this? > > > > (_4 {. 0&".) ;._2 T > > > > Ric > > > > On Mon, Dec 20, 2010 at 11:03 AM, Bo Jacoby <bojac...@yahoo.dk> wrote: > > > I need elementary advice. Please help me. > > > > > > I have a text T, retrieved by cut and past from a pdf-document, like > > this: > > > > > > T =. 0 : 0 > > > SN 1990O . . . . . . 9065 134.7 67.3 2.3 > > > SN 1990T . . . . . . . 12012 158.9 75.6 3.1 > > > SN 1990af . . . . . . 15055 198.6 75.8 2.8 > > > SN 1991S . . . . . . . 16687 238.9 69.8 2.8 > > > SN 1991U . . . . . . 9801 117.1 83.7 3.4 > > > ) > > > > > > How to produce a 5 row 4 column array containing the numeric data from > T? > > > > > > - Bo > > > > > > > > > > > > > > > ---------------------------------------------------------------------- > > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > -- > Björn Helgason, Verkfræðingur > Fornustekkum II > 781 Hornafirði, > t-póst: gos...@gmail.com > gsm: +3546985532 > sími: +3544781286 > 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 > -- Björn Helgason, Verkfræðingur Fornustekkum II 781 Hornafirði, t-póst: gos...@gmail.com gsm: +3546985532 sími: +3544781286 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