Advertisement
Guest User

getSymbols.csv fails

a guest
Sep 10th, 2011
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. qn: what's wrong with the following csv, dates are not properly read!
  2. plz help!
  3.  
  4. d4.csv
  5. ======
  6. "Date","Open","High","Low","Close","Volume","Adj"
  7. 17-03-2008 00:05:00,65.45,65.5,65.05,65.05,0,0
  8. 18-03-2008 00:06:00,65.45,65.5,65.05,65.05,0,0
  9. 19-03-2008 00:07:00,65.45,65.5,65.05,65.05,0,0
  10.  
  11.  
  12. R-console
  13. =========
  14.  
  15. > getSymbols('d4');head(D4)
  16. [1] "D4"
  17. D4.Open D4.High D4.Low D4.Close D4.Volume D4.Adjusted
  18. 2011-09-10 65.45 65.5 65.05 65.05 0 0
  19. 2011-09-10 65.45 65.5 65.05 65.05 0 0
  20. 2011-09-10 65.45 65.5 65.05 65.05 0 0
  21.  
  22. > str(D4)
  23. An ‘xts’ object from 2011-09-10 to 2011-09-10 containing:
  24. Data: num [1:3, 1:6] 65.5 65.5 65.5 65.5 65.5 ...
  25. - attr(*, "dimnames")=List of 2
  26. ..$ : NULL
  27. ..$ : chr [1:6] "D4.Open" "D4.High" "D4.Low" "D4.Close" ...
  28. Indexed by objects of class: [Date] TZ:
  29. xts Attributes:
  30. List of 2
  31. $ src : chr "csv"
  32. $ updated: POSIXct[1:1], format: "2011-09-10 20:56:50"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement