[R] strange strsplit gsub problem 0 is this a bug or a string length limitation?

2009-07-10 Thread tradenet
I was working with the rmetrics portfolioBacktesting function and dug into the code to try to find why my formula with 113 items, i.e. A1 thru A113, was being truncated and I only get 85 items, not 113. Is it due to a string length limitation in R or is it a bug in the strsplit or gsub functions,

Re: [R] strange strsplit gsub problem 0 is this a bug or a string length limitation?

2009-07-10 Thread tradenet
find the other fPortfolio functions that may be referenced by the original, non "_hack" version of the function. Warm regards, Andrew Marc Schwartz-3 wrote: > > On Jul 10, 2009, at 7:18 AM, tradenet wrote: > >> >> I was working with the rmetrics portfolioBacktesti

Re: [R] strange strsplit gsub problem 0 is this a bug or a string length limitation?

2009-07-10 Thread tradenet
Thanks Marc. I forwarded the suggestion to Dr. Wuertz and Dr. Chalabi at Rmetrics. Warm regards, Andrew Borden Marc Schwartz-3 wrote: > > On Jul 10, 2009, at 9:07 AM, tradenet wrote: > >> >> Thanks Marc! >> >> I just found that the ~500 char limitation

[R] getting a timeseries element into a string

2009-07-10 Thread tradenet
I have a timeseries object, ts, and want to get the first date in the series into a string so I can concatenate it with a SQL query. Input and output are shown below. I must be missing something very basic, but I can't seem to pry the data ("2008-07-01") into a string variable. Any suggestions w

Re: [R] getting a timeseries element into a string

2009-07-12 Thread tradenet
(0) > ttt<-(ts[1,0]) > print(ttt) GMT 1970-01-01 what I want to get is a string containing "1970-01-01" Thank you. tradenet wrote: > > I have a timeseries object, ts, and want to get the first date in the > series into a string so I can concatenate it with a SQ

Re: [R] getting a timeseries element into a string

2009-07-13 Thread tradenet
uot; > R> (s <- as.character(time(ts)[1])) > [1] "1970-01-01" > R> class(s) > [1] "character" > > > > > > > tradenet wrote: >> I added a reproducible example to my question... >> >> ts<-dummyDailySeries(x = rnorm(365), u

[R] RODBC results from stored procedure

2009-07-15 Thread tradenet
Short of uploading a SQL server database, I don't think I can make this example reproducible, but I hope it's not so complicated as to require reproducibility I'm using RODBC to get data from Microsoft SQL Server. I can call a parametrized stored procedure without a problem and the proc does

Re: [R] RODBC results from stored procedure

2009-07-20 Thread tradenet
Thanks Dieter. The date argument isn't a problem. When I invoke the stored proc execution with the date arguments the stored proc runs fine, but RODBC doesn't wait for the stored proc to finish and return results. Regards, Andrew Dieter Menne wrote: > > > > traden

[R] Rcmdr GUI goes into loop via alt+backspace under Windows OS

2009-07-21 Thread tradenet
I'm using Rcmdr version 1.4-10 with R version 2.9.0 under Vista x64. A standard editing convention under Windows is that alt+backspace is a keyboard shortcut for "undo". I often find myself hitting the [alt] and [backspace] keys while editing scripts in Rcmdr. However, this causes the Rcmdr GUI

Re: [R] RODBC results from stored procedure

2009-07-21 Thread tradenet
query manually before running any R scripts. Not ideal, but I'm at a loss for what else to try for this prickly case. Warm regards, Andrew Dieter Menne wrote: > > > > tradenet wrote: >> >> Thanks Dieter. >> >> The date argument isn't a probl

Re: [R] Rcmdr GUI goes into loop via alt+backspace under Windows OS

2009-07-22 Thread tradenet
a "standard" combination? I know a lot of programs that > use > ctrl-Z, but I've never come across this shortcut key combination for undo. > > > - Original Message - > From: "tradenet" > To: > Sent: Tuesday, July 21, 2009 5:39 PM