"infinitivus" shortly is Inf , how to work with this?


#1

Inf in Any Array (text) is recognzed like Float64. how to work with this ?

for i=1:k
Slow[i,2]=string(uppercase(slow[i,2][1]),string(slow[i,2][2:end]))
println(i)
end


920370
920371
ERROR: MethodError: no method matching uppercase(::Float64)
Closest candidates are:
uppercase(::LegacyStrings.ASCIIString) at C:\Users\PC.julia\v0.6\LegacyStrings\src\ascii.jl:60
uppercase(::Char) at strings/utf8proc.jl:201
uppercase(::AbstractString) at strings/basic.jl:401
Stacktrace:
[1] macro expansion at .\REPL[83]:2 [inlined]
[2] anonymous at .<missing>:?

julia> slow[920372,:]
2-element Array{Any,1}:
"infinitivus"
Inf


#2

That must have happened when you read the data in.
How did you input the data?


#3

I am reading by readdlm
datafile is codin in UTF8 (without BOM)

a=readdlm(“data\datafile.txt”,’;’)
slow=string.(a[:,1:2])

Paul

W dniu 2018-02-12 o 10:58, Scott Jones pisze: