Strings are immutable, so replace can't change the existing string, so it 
returns a new string, so map returns a new array which you have to assign 
back to x

Cheers
Lex


On Tuesday, May 19, 2015 at 2:10:18 AM UTC+10, paul analyst wrote:
>
>  Big thx, but after this code x is no changed
> Paul
>
> W dniu 2015-05-17 o 20:23, wil...@gmail.com <javascript:> pisze:
>  
> map(e->replace(string(e), ',', '.'), x)
>
> On Saturday, May 16, 2015 at 2:40:05 PM UTC-4, paul analyst wrote: 
>>
>> I have file with decimal separator lika ","
>> x=readdlm("x.txt",'\t')
>>
>> julia> x=x[2:end,:]
>> 6390x772 Array{Any,2}:
>>
>> some kolumns looks :
>> julia> x[:,69]
>> 6390-element Array{Any,1}:
>>  0.0
>>   "0,33"
>>   "0,72"
>>   "1,09"
>>   "0,95"
>>   "3,57"
>>   "2,27"
>>   "2,42"
>>
>>
>>
>> julia> replace(x[:,69],',','.')
>> ERROR: `replace` has no method matching replace(::Array{Any,1}, ::Char, 
>> ::Char)
>>
>> julia> replace(string(x[:,69],',','.'))
>> ERROR: `replace` has no method matching replace(::ASCIIString)
>>
>>
>> how to replace , to . ?
>>
>> I can repalce all , to . 
>>
>> Paul
>>
>>
>>   
>  

Reply via email to