Andrew, Big Thx

My number col now is 24, but in future is unknow. How to know colcnt ? (in script is 4)

(Now data after script is rotated , real data is data' ;) )
Paul



W dniu 2014-11-29 o 07:56, Andrew Dolgert pisze:
The readcsv command only pads <https://github.com/JuliaLang/julia/blob/ab1f287906327941f401ed85f0fa6fd549b17bbf/base/datafmt.jl#L173> for the Any type and AbstractString type. The skipblanks option doesn't appear to help. If the file is as regular as you show, then parsing might not be so bad.

function readit(filename)
        # Just one way to get the number of lines. Needs unix.
linecnt=int(match(r"\d+", readall(`wc -l z.txt`)).match)
data=Array(Int, (4,linecnt))
open(filename) do fileio
anint=r"\d+"
idx=1
for line=eachline(fileio)
   m=matchall(anint, line)
   if m!=nothing
   data[1:length(m),idx]=map(int, m)
   idx+=1
end
end
end
data
end

Reply via email to