RE: [R] Common principle components

2004-05-27 Thread Heywood, Giles
I was a lttle shocked to see your report of 3.2M hits for the correct speeling versus 1.8M for incorrect. This is a ratio of just 1.8! Google normally has much higher power than this, as the arbiter of spelling disputes. A quick google reveals however that your search is for

RE: [R] Common principle components

2004-05-27 Thread Heywood, Giles
A typo in previous post: for latter, read former. Apologies for the confusion. ** This is a commercial communication from Commerzbank AG.\ \ T...{{dropped}} __ [EMAIL PROTECTED]

RE: [R] Aggregating frequency of irregular time series

2004-04-07 Thread Heywood, Giles
Although this thread might be considered closed by some, I'd like to make a late contribution, since I contributed the extractIts() function in the 'its' package. See ?itsSubset, which gives details of: extractIts(x,weekday=FALSE,find=c(all,last,first),period=c(week,mon th),partials=TRUE,select)

RE: [R] get.hist.quote - is great, but am I missing something?

2004-03-03 Thread Heywood, Giles
If you use priceIts() in package 'its' (Irregular Time Series), you get similar functionality, and the labelling etc in plot() recognizes the calendar. You can also do further calendar-based extractions, etc. - Giles -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

[R] match.call(), S4

2004-03-03 Thread Heywood, Giles
I get different results from match.call(), according to whether a function is dispatched via S3 or S4. Specifically, when I use S4 dispatch in the following example, the match.call() result is of length 1 less than I expect. I need to add an extra comma to get the same results as in the S3

Re: [R] get.hist.quote - is great, but am I missing something?

2004-03-03 Thread Heywood, Giles
If you wish to 'skip' (i.e. not interpolate) weekends in its, you could use the following: prices - priceIts(instrument=ongc.ns) plot(union(prices,newIts(start=start(prices),end=end(prices))),interp=none ) - Giles -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

[R] an extension to 'array'

2004-03-02 Thread Heywood, Giles
1. I want to extend the 'array' class, and prefer to use S4 in the belief that this is the best structure for new projects (as the documentation says). I actually wish to do something similar to the excellent Oarray by Jonathan Rougier, but as this class is S3, I can't see how to extend it by S4.

RE: [R] Irregular Time series

2003-12-04 Thread Heywood, Giles
You could take a look at the irregular time-series (its) package on CRAN. Your series is certainly irregular, and possibly a little er... sparse. Anyway, the following might get you started: require(its) mydates - c(28.8.1962,27.6.1977,19.7.1989,26.6.1995,26.7.1999) data -

RE: [R] Bollinger Bands

2003-11-25 Thread Heywood, Giles
You might wish to have a look at the 'its' package for irregular time-series on CRAN. If your prices are in an its called price, then the following will get you on your way. Since it is not efficient either in storage or computation, I offer it because it might be convenient for display,

RE: Subject: RE: [R] Time plot question.

2003-11-13 Thread Heywood, Giles
The following is an example of a dataframe containing times, plus some numeric data. foo - c(12:39:26,12:40:22,12:41:19) bar - data.frame(foo,1:3,11:13) Note that the times are of class 'factor' (their class changes in this case, as they go into the dataframe). To convert this dataframe to an

RE: [R] Calendar Time Series

2003-11-12 Thread Heywood, Giles
I'm not sure what a calendar time series is, but it may be helpful to consider it as an irregular time series, depending on what analysis or display you are wanting to do. As you say, there are packages (including 'its') for this purpose. - Giles -Original Message- From: Brian

RE: [R] ts vs. POSIX

2003-10-29 Thread Heywood, Giles
Well, I'm not sure I understand the question exactly, but you might want to have a look at the package 'its', as Achim said. A practical example might look like: You have a .csv file as follows (I have chosen the date format at random). ,x,y Monday 08-Sep-2003,1,11 Monday 15-Sep-2003,2,22

RE: [R] High frequency time-series

2003-10-22 Thread Heywood, Giles
You may find the irregular time-series (its) package on CRAN helpful. If your raw data were in a csv file thus: x april 26 2002 15:00:00 1.1 april 26 2002 15:15:00 1.2 april 26 2002 15:30:00 1.3 april 26 2002 15:45:00 1.4 Then you could read it in thus:

RE: [R] ts - unit conversion

2003-09-30 Thread Heywood, Giles
Financial data, as you point out, is generally irregular, which is in essence what prompted the devlopment of the irregular time-series (its) package, which is posted on CRAN (v0.1.2 posted today, incidentally). In the its class, the time-stamps of the rows of a matrix are represented using the

RE: [R] Date on x-axis of xyplot

2003-09-23 Thread Heywood, Giles
One thing you could do is to use the 'its' (irregular time-series) package on CRAN. e.g. using a trivial dataset require(its) its.format(%Y-%m-%d) #defines text format of dates in dimnames df - data.frame(1:3,(1:3)^2) dimnames(df) - list(c(2003-01-03,2003-01-06,2003-01-07),letters[1:2])

RE: [R] Changing Tick Marks for Date Plots

2003-09-09 Thread Heywood, Giles
The way to control number of tickmarks in plot is via par(lab) par(lab=c(5,5,7)) #the default plot(rnorm(20),rnorm(20)) par(lab=3*c(5,5,7)) plot(rnorm(20),rnorm(20)) However this does not work for axis.POSIXct, which the function called by the plot method for 'its'. I am not sure why this is.

Re: [R] Plotting dates

2003-09-02 Thread Heywood, Giles
One solution is to use the Irregular Time-Series (its) package on CRAN. LeafDig - cbind(Leafminers,Diglyphus) dimnames(LeafDig)[[1]] - c(05/02/03,05/09/03,05/16/03,05/23/03,05/30/03,06/07/03,06/14/0 3) require(its) its.format(%m/%d/%y) plot(its(LeafDig),format=%d %b %y) You can select date

RE: [R] readcsvIts() to create irregular time series

2003-09-01 Thread Heywood, Giles
Jan The function readcsvIts reads a csv file into a matrix. To convert the matrix into an 'its', apply the its function to the matrix. So for your example its.format(%m/%d/%Y) test­ - its(readcsvIts(filename)) is.its(test) TRUE The its documentation for readcsvIts states incorrectly that an

RE: [R] Read date for timeserie object

2003-08-21 Thread Heywood, Giles
You might wish to have a look at the package 'its' for handling irregular time-series. If your data is in a .csv file, the following would enable you to handle the data in its irregular form. its.format(%m/%d/%Y) readcsvIts(filename) - Giles -Original Message- From: Jan Verbesselt

RE: [R] New package: irregular time-series (its)

2003-08-18 Thread Heywood, Giles
to raise, and the documentation provided does not answer your questions, I suggest you contact me off-list. Regards Giles Heywood -Original Message- From: Fan [mailto:[EMAIL PROTECTED] Sent: 17 August 2003 17:12 To: Heywood, Giles Subject: Re: [R] New package: irregular time-series

[R] New package: irregular time-series (its)

2003-08-14 Thread Heywood, Giles
I have uploaded to CRAN a new package named 'its' (Irregular Time-Series). It implements irregular time-series as an S4 class, extending the matrix class, and records the time-stamp of each row in the matrix using POSIX. Print, plot, extraction, append, and related functionality are available.

RE: [R] Import time series data with uneven dates

2003-06-19 Thread Heywood, Giles
A solution is at hand using the 'irts' (irreglar time-series) class from package tseries. If your raw data is in a csv file, you could proceed as follows: mydata - read.csv(filename,header=TRUE) basedate - as.POSIXct(strptime(2003-01-01 00:00:00,format=%Y-%m-%d %X)) rawdates -