Re: [R] Split xts data set into weeks

2013-02-03 Thread Seimizu Joukan
Hi, Michael Thank you very much! > Looking at args(split.xts) I think you actually do want split(..., f = > ) here, not split(..., frequency = ), which would ignore and default > to months. yes, split(...,f=) is what I want. > so I think it's likely a timezone issue. Try setting > indexTZ(tmp)

Re: [R] Split xts data set into weeks

2013-02-03 Thread R. Michael Weylandt
On Sun, Feb 3, 2013 at 6:57 AM, Seimizu Joukan wrote: > Would you please paste the following codes to R console and make a > confirmation? > Indeed, well done and much appreciated. > #Codes start from here > > library("quantmod") > tmp<-structure(c(112.34, 112.89, 112.75, 113.5, 115.16, 115.21,

Re: [R] Split xts data set into weeks

2013-02-03 Thread Seimizu Joukan
Hi, Jeff Thank you for your advice. > Your example of the problem is not reproducible [1]. This behavior could > arise due to small discrepancies in the index values, or from specifying > "frequency" instead of "f" as the second argument, our perhaps you have found > a bug that only your data

Re: [R] Split xts data set into weeks

2013-02-02 Thread Jeff Newmiller
Your example of the problem is not reproducible [1]. This behavior could arise due to small discrepancies in the index values, or from specifying "frequency" instead of "f" as the second argument, our perhaps you have found a bug that only your data triggers. Any verification of what your proble

[R] Split xts data set into weeks

2013-02-02 Thread Seimizu Joukan
Hi I am trying to use split() to split a xts data set into weeks, but the result seems not right. original data is as following: > head(xec) Open HighLow Close mean 2011-02-28 112.34 113.34 111.96 112.87 112.6275 2011-03-01 112.89 113.71 112.75 112.80 113.0375 2011-03-02 1