Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Text-processing-2/J/text-processing-2.j
Normal file
20
Task/Text-processing-2/J/text-processing-2.j
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
require 'tables/dsv dates'
|
||||
dat=: TAB readdsv jpath '~temp/readings.txt'
|
||||
Dates=: getdate"1 >{."1 dat
|
||||
Vals=: _99 ". >(1 + +: i.24){"1 dat
|
||||
Flags=: _99 ". >(2 + +: i.24){"1 dat
|
||||
|
||||
# Dates NB. Total # lines
|
||||
5471
|
||||
+/ *./"1 ] 0 = Dates NB. # lines with invalid date formats
|
||||
0
|
||||
+/ _99 e."1 Vals,.Flags NB. # lines with invalid value or flag formats
|
||||
0
|
||||
+/ *./"1 [0 < Flags NB. # lines with only valid flags
|
||||
5017
|
||||
~. (#~ (i.~ ~: i:~)) Dates NB. Duplicate dates
|
||||
1990 3 25
|
||||
1991 3 31
|
||||
1992 3 29
|
||||
1993 3 28
|
||||
1995 3 26
|
||||
Loading…
Add table
Add a link
Reference in a new issue