Octave - Fetch function - api
I would like to use the Fecth function to get some data, looking at the example in the .m file I can't seem to run the function with the following command;
fetch(yahoo(), "yhoo", "01-Jul-2015", "10-Jul-2015", "w")
This gives me the following error;
error: dates(_,4): but dates has size 0x0
error: called from
fetch_yahoo at line 69 column 12
fetch at line 124 column 18
Does anyone have any idea what's going wrong here? I've tried changing the 'w' to 'd' but have no idea what's going wrong?
Related
What should the CSV file format look like for correct parsing with pandas?
I get an error parsing my CSV file that I want to convert to XLSX. The part of the file it complains about looks like this: Number,2000-00-00 ,,System,,,,,,,,,,,,System, ,,Type,,,,Type,,,,Type,,,,Type,,,,Type,,,,Type, Settings, Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample, System,"dist, dist, dist, dist",0,104,21,65,0,128,5,29,0,62,0,1,0,11993,26,56,0,1321,14,18,0,63,0,0, Number,2000-00-00 ,,System,,,,,,,,,,,,System, ,,Type,,,,Type,,,,Type,,,,Type,,,,Type,,,,Type, Settings, Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample, System,"dist, dist, dist, dist",0,1141,29,71,0,121,3,15,0,62,0,0,0,14034,22,47,0,84,1,10,0,80,0,0, Total,,0,8436,13,62,0,839,24,163,0,451,0,2,0,97906,235,434,0,846,38,10,0,462,0,2, Total 2,,,,,841,,,,8556,,,,453,,,,985,,,,869,,,,46 Total 3 ,,,,,,,,,,,,,350,,,,,,,,,,,,1078 Full,,2898 Example of error: converter | Skipping line 3: expected 16 fields, saw 24 converter | Skipping line 4: expected 16 fields, saw 27 converter | Skipping line 5: expected 16 fields, saw 27 Screenshot So I understand it's about a lot of delimiters, which are needed to form empty fields. Although pandas complains about the parsing error, the file itself looks correct when opened. Is it really about consecutive delimiters? If so, why does the file itself look correct? If not, what could be the problem?
Fortran runtime error: End of file when reading input data
I'm currently running a code and I'm always getting to the same end. I am trying to read an input file and it returns the error: Fortran runtime error: End of file In an other post they said to put in the iostat specifier so now my code looks like this: INTEGER :: m INTEGER :: st Open(Unit = 13,action='read',file='Data_Inp.dat',status='old') read (13,*, iostat = st) m write (*,*) st write (*,*) m ALLOCATE(winkel(m),energie(m)) Do i = 1,m read(13,*),winkel(i),energie(i) End Do And the input file looks like this: 12 -17.83 -0.019386527878 -15.83 -0.020125057233 -12.83 -0.020653853148 -11.83 -0.020840036028 -9.83 -0.020974157405 -8.83 -0.021056401707 -6.83 -0.021065517811 -5.83 -0.020992571816 -4.83 -0.020867828448 -1.83 -0.02069158012 Now the terminal prints a -1 for iostat and a constantly changing number for m.
If the first read command is causing an error, check for extraneous characters before or after "12" in your input file, especially if you created it on one platform (Windows?) and using it on another platform (Linux? Mac?)
Error in SQL-Oracle Code when raising value to the nth power - Need assistance
I'm running SQL code within Oracle and need help revising the below "Update" script. The below script gives me the error “missing equal sign” due to the " ^ " in the last line of the code that is meant to take the Table-B.ValueY value to the Table-A.ValueZ power. I tried changing the last line to a Power (x,y) formula, but that gives me "%s: invalid identifier" error. I also went so far as to change the code completely into a CREATE TABLE, but that just appears be caught in a loop and never finishes. Any help is much appreciated. Original code: UPDATE Table-A SET Column-X = 0 WHERE TABLE-A.mid = TABLE-B.mid AND TABLE-A.tdlinx = TABLE-B.tdlinx AND TABLE-B.ValueY ^ TABLE-A.ValueZ > 0.1;
there is a POWER function SELECT POWER(10,2) FROM DUAL; yours should look similar to this: POWER( TABLE-B.ValueY, TABLE-A.ValueZ ) > 0.1
error when trying to import ps file by grImport in R
I need to create a pdf file with several chart created by ggplot2 arranged in a A4 paper, and repeat it 20-30 times. I export the ggplot2 chart into ps file, and try to PostScriptTrace it as instructed in grImport, but it just keep giving me error of Unrecoverable error, exit code 1. I ignore the error and try to import and xml file generated into R object, give me another error: attributes construct error Couldn't find end of Start Tag text line 21 Premature end of data in tag picture line 3 Error: 1: attributes construct error 2: Couldn't find end of Start Tag text line 21 3: Premature end of data in tag picture line 3 What's wrong here? Thanks!
If you have no time to deal with Sweave, you could also write a simple TeX document from R after generating the plots, which you could later compile to pdf. E.g.: ggsave(p, file=paste('filename', id, '.pdf')) cat(paste('\\includegraphics{', paste('filename', id, '.pdf'), '}', sep=''), file='report.pdf') Later, you could easily compile it to pdf with for example pdflatex.
What's "\." in postgresql dump file?
I have a Postgresql dump file which i'm trying to restore. I get this error regarding an invalid data i guess. ERROR: invalid input syntax for integer: "." and when i checked the file, there are data like this: 469215 2009-10-10 18:16:47.041377 0 1 471217 2009-10-10 18:25:12.536352 0 1 473224 2009-10-17 09:46:43.041604 0 1 473228 2009-10-22 10:58:40.194244 0 1 . so i was wondering what is this "." do? i check some other working dumps and they ended their data line with "." which i guess it's the correct syntax! Please tell me what's the correct syntax and what does it do? thank you
Seems that it marks the end of a COPY statement From the documentation End of data can be represented by a single line containing just backslash-period (\.). An end-of-data marker is not necessary when reading from a file, since the end of file serves perfectly well; it is needed only when copying data to or from client applications using pre-3.0 client protocol.