Re: [R] Another quantmod question

2011-05-08 Thread Russ Abbott
Jeff, Clearly you (and others) have put a lot of work into xts -- and I'm the beneficiary. So I'll stop complaining. Thanks for the class (both code and explanation). *-- Russ * On Sun, May 8, 2011 at 8:23 PM, Jeff Ryan wrote: > Hi Russ, > > We're of course getting into some incredibly fine

Re: [R] Another quantmod question

2011-05-08 Thread Jeff Ryan
Hi Russ, We're of course getting into some incredibly fine-level detail on how all of this works. I'll try and explain issues as I recall them over the development of xts and cbind.xts xts started as an extension of zoo. zoo is an extension of 'ts' (greatly simplified comparison of course, but

Re: [R] Another quantmod question

2011-05-08 Thread Joshua Wiley
On Sun, May 8, 2011 at 1:17 PM, Russ Abbott wrote: > I understand Josh's example: > > mat <- matrix(1:10, dimnames = list(NULL, "A")) > cbind(X = 11:20, Y = mat + 1) > cbind(X = 11:20, Y = mat[, "A"] + 1) > > In the line, cbind(X = 11:20, Y = mat + 1), it would be nice if an error or > warning mes

Re: [R] Another quantmod question

2011-05-08 Thread Joshua Ulrich
Russ, On May 8, 2011 6:29 PM, "Russ Abbott" wrote: > > Hi Jeff, > > The xts class has some very nice features, and you have done a valuable > service in developing it. > > My primary frustration is how difficult it seems to be to find out what went > wrong when my code doesn't work.  I've been wr

Re: [R] Another quantmod question

2011-05-08 Thread Russ Abbott
Hi Jeff, The xts class has some very nice features, and you have done a valuable service in developing it. My primary frustration is how difficult it seems to be to find out what went wrong when my code doesn't work. I've been writing quite sophisticated code for a fairly long time. It's not tha

Re: [R] Another quantmod question

2011-05-08 Thread Jeff Ryan
Hi Russ, Colnames don't get rewritten if they already exist. The reason is due to performance and how cbind is written at the R level. It isn't perfect per se, but the complexity and variety of dispatch that can take place for cbind in R, as it isn't a generic, is quite challenging to get to

Re: [R] Another quantmod question

2011-05-08 Thread Russ Abbott
I understand Josh's example: mat <- matrix(1:10, dimnames = list(NULL, "A")) cbind(X = 11:20, Y = mat + 1) cbind(X = 11:20, Y = mat[, "A"] + 1) In the line, cbind(X = 11:20, Y = mat + 1), it would be nice if an error or warning message were issued to the effect that the "Y = " part is ignored or

Re: [R] Another quantmod question

2011-05-08 Thread Joshua Wiley
Hi Russ, On Sun, May 8, 2011 at 12:07 PM, Russ Abbott wrote: > I'm having troubles with the names of columns. > > quantmod deal with stock quotes.  I've created an array of the first 5 > closing prices from Jan 2007. (Is there a problem that the name is the same > as the variable name? There shou

Re: [R] Another quantmod question

2011-05-08 Thread David Winsemius
On May 8, 2011, at 3:07 PM, Russ Abbott wrote: I'm having troubles with the names of columns. quantmod deal with stock quotes. I've created an array of the first 5 closing prices from Jan 2007. (Is there a problem that the name is the same as the variable name? There shouldn't be.) close

[R] Another quantmod question

2011-05-08 Thread Russ Abbott
I'm having troubles with the names of columns. quantmod deal with stock quotes. I've created an array of the first 5 closing prices from Jan 2007. (Is there a problem that the name is the same as the variable name? There shouldn't be.) > close close 2007-01-03 1416.60 2007-01-04