I seem to have forgotten xts package functionality. Let me do one thing for a change today. I will remember the major functionality of xts data and then read the documentation again.

What do I recall about the package ?

  1. used to store time series data
  2. written on the top of “zoo” package
  3. written by Jeffery Ryan
  4. has a lot of nice functions like endpoints, rollapply, etc
  5. more than one time series can be put in an xts object
  6. functions I remember using from this package are endpoints, rollapply, apply,etc

Ok, now let me read a formal article on xts

  1. xts biggest advantage is extensibility and hence its name. Arbitrary attributes can be added or removed. If you use as.xts() your original object is stored well in the format
  2. subsetting functions are very useful CCYY:MM:DD/CCYY:MM:DD can be used to subset the xts object
  3. plotting an xts object is more richer than plain plot from base package
  4. first() , last() functions are also useful to check the range of xts
  5. index class for an xts object can be anything. indexClass() function can be used to retrieve the index class. convertIndex() can be used to convert an xts object with a certain indexClass to a desired indexClass
  6. You can convert a matrix in to xts object by seeing to it that matrix has rownames that are dates in the form of character data
  7. use minor.ticks and major.ticks function to control the xts plot
  8. Learnt a big lesson that you can’t apply as.Date function just like that to index(xts) object. It is always better to use strptime function
  9. as.Date is always applicable to character based input
  10. apply.monthly, apply.weekly, apply.yearly, period.max, period.min, period.sum, period.prod are some of the useful functions
  11. endpoints is the one I have used to max
  12. I need to build my own xts version of function to get an idea of extensibility