From: Dirk Eddelbuettel (edd@debian.org)
Date: Fri 28 Jun 2002 - 21:46:41 EST
Message-id: <20020628114641.GA13042@sonny.eddelbuettel.com>
On Fri, Jun 28, 2002 at 10:18:42AM +0100, Luis Torgo wrote:
> > ibm <- get.hist.quote("IBM",start="2000-01-01")
[...]
> window(ibm,start=julian(as.POSIXct("2000-01-03")),end=julian(as.POSIXct("2000-01-03")))
[...]
> In summary, my problem is to find the easiest way to convert from my
> "natural" way of thinking on the quotes (which is date-based) into the
> indexing schema of time series objects, which by looking at the code of
> "get.hist.quote" is based on the conversion into the number of days (using
> "julian") from an origin.
I don't think there is -- ts() cannot deal that well with "business-daily"
data. It is intended for monthly or quarterly data with regular increments,
or frequency. Dealing with daily data with weekends and holidays is much
harder. Adrian's solution of converting to Julian and padding with NaN for
non-business days is probably as good as it gets.
Dirk
-- Good judgement comes from experience; experience comes from bad judgement. -- Fred Brooks -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2.1.3 : Wed 16 Oct 2002 - 11:57:34 EST