[julia-users] Re: Readtimearray function in Julia TimeSeries package

2015-08-04 Thread Danny Zuko
Le lundi 3 août 2015 16:20:19 UTC+2, Ismael VC a écrit :

 You should file a bug report here: 
 https://github.com/JuliaStats/TimeSeries.jl/issues

I found out it is sufficient to replace the 1st field of the 1st line () 
with some non-empty string (e.g. Dates). Then it works. For more details, 
see 
http://stackoverflow.com/questions/31786795/readtimearray-function-in-julia-timeseries-package
  


The problem should be at lines 6-8 here: 
https://github.com/JuliaStats/TimeSeries.jl/blob/fbc1b518dfb56bd8daa09a2e8c0432f478c73f79/src/readwrite.jl
 
 


[julia-users] Re: Readtimearray function in Julia TimeSeries package

2015-08-03 Thread David Gold
I'm not familiar with TimeSeries, but perhaps you should check if 
readtimearray automatically detects headers?

On Monday, August 3, 2015 at 8:07:37 AM UTC-4, Danny Zuko wrote:

 I would like to read a csv file of the following form with readtimearray:


 ,ES1 Index,VG1 Index,TY1 Comdty,RX1 Comdty,GC1 Comdty
 1999-01-04,1391.12,3034.53,66.515625,86.2,441.39
 1999-01-05,1404.86,3072.41,66.3125,86.17,440.63
 1999-01-06,1435.12,3156.59,66.4375,86.32,441.7
 1999-01-07,1432.32,3106.08,66.25,86.22,447.67
 1999-01-08,1443.81,3093.46,65.859375,86.36,447.06
 1999-01-11,1427.84,3005.07,65.71875,85.74,449.5
 1999-01-12,1402.33,2968.04,65.953125,86.31,442.92
 1999-01-13,1388.88,2871.23,66.21875,86.52,439.4
 1999-01-14,1366.46,2836.72,66.546875,86.73,440.01
  

 However, here's what I get when I evaluate readtimearray(myfile.csv)


 ERROR: `convert` has no method matching convert(::Type{UTF8String}, ::Float64)
  in push! at array.jl:460
  in readtimearray at /home/juser/.julia/v0.3/TimeSeries/src/readwrite.jl:25
  

 What is it that I am not seeing?



[julia-users] Re: Readtimearray function in Julia TimeSeries package

2015-08-03 Thread Ismael VC


You should file a bug report here: 
https://github.com/JuliaStats/TimeSeries.jl/issues

This readtimearray(fname::String; meta=Nothing, format::String=””) methods 
doesn’t exist, the documentation must be out of date:

julia methods(readtimearray)
# 1 method for generic function readtimearray:
readtimearray(fname::String) at 
/home/juser/.julia/v0.4/TimeSeries/src/readwrite.jl:4

http://timeseriesjl.readthedocs.org/en/latest/readwrite.html#readtimearray

The documentation doesn’t say anything about the header (it just says 
readtimearray is a wrapper of readcsv), but neither removing the header 
manually nor Pkg.update(); Pkg.checkout(TimeSeries) solve this issue.

El lunes, 3 de agosto de 2015, 7:07:37 (UTC-5), Danny Zuko escribió:

I would like to read a csv file of the following form with readtimearray:


 ,ES1 Index,VG1 Index,TY1 Comdty,RX1 Comdty,GC1 Comdty
 1999-01-04,1391.12,3034.53,66.515625,86.2,441.39
 1999-01-05,1404.86,3072.41,66.3125,86.17,440.63
 1999-01-06,1435.12,3156.59,66.4375,86.32,441.7
 1999-01-07,1432.32,3106.08,66.25,86.22,447.67
 1999-01-08,1443.81,3093.46,65.859375,86.36,447.06
 1999-01-11,1427.84,3005.07,65.71875,85.74,449.5
 1999-01-12,1402.33,2968.04,65.953125,86.31,442.92
 1999-01-13,1388.88,2871.23,66.21875,86.52,439.4
 1999-01-14,1366.46,2836.72,66.546875,86.73,440.01
  

 However, here's what I get when I evaluate readtimearray(myfile.csv)


 ERROR: `convert` has no method matching convert(::Type{UTF8String}, ::Float64)
  in push! at array.jl:460
  in readtimearray at /home/juser/.julia/v0.3/TimeSeries/src/readwrite.jl:25
  

 What is it that I am not seeing?

​