Re: [R-SIG-Finance] rbbg connection problem

2014-05-01 Thread Aidan Corcoran
works perfectly! thanks for your help John! On Thu, May 1, 2014 at 9:13 AM, John Laing john.la...@gmail.com wrote: Um I've never seen that before. A quick Google yields this: http://r.789695.n4.nabble.com/weird-error-with-a-lazyload-RData-file-in-a-package-td4662836.html And indeed,

[R-SIG-Finance] Mode list to mode numerical.... fast..

2014-05-01 Thread Steve Greiner
Okay, I've had it!!!.. Every time I read in a dataset using something like: returnmatrix = read.csv(SP.csv, header=TRUE, sep=,) It comes back with returnmatrix as mode list. How can I quickly convert the dataset to mode numerical? This is pissing me off. I can do it manually by

Re: [R-SIG-Finance] Mode list to mode numerical.... fast..

2014-05-01 Thread Joshua Ulrich
On Thu, May 1, 2014 at 8:47 AM, Steve Greiner sgrei...@factset.com wrote: Okay, I've had it!!!.. Every time I read in a dataset using something like: returnmatrix = read.csv(SP.csv, header=TRUE, sep=,) It comes back with returnmatrix as mode list. How can I quickly convert the dataset to

Re: [R-SIG-Finance] Mode list to mode numerical.... fast..

2014-05-01 Thread Dirk Eddelbuettel
On 1 May 2014 at 09:04, Joshua Ulrich wrote: | On Thu, May 1, 2014 at 8:47 AM, Steve Greiner sgrei...@factset.com wrote: | Okay, I've had it!!!.. Every time I read in a dataset using something like: | returnmatrix = read.csv(SP.csv, header=TRUE, sep=,) | | It comes back with returnmatrix

Re: [R-SIG-Finance] Mode list to mode numerical.... fast..

2014-05-01 Thread Mustafa Baydogan
Take a look at the solution proposed here - http://stackoverflow.com/questions/9842794/fastest-way-to-import-millions-of-files-in-r Basically, package 'data.table' provides a function called 'fread' which is significantly faster than other read options. I am using it for different tasks and I can

[R-SIG-Finance] preserving dates in output of tseries

2014-05-01 Thread aschmid1
I've been stuck for a while with seemingly simple task. I calculate returns using data from yahoo: etf = SPY startDate = 2008-12-01 endDate = 2014-04-04 prc - get.hist.quote(instrument = etf, startDate, endDate, quote = AdjClose, provider = yahoo ) tt-as.zoo(prc) dates-index(tt)

Re: [R-SIG-Finance] preserving dates in output of tseries

2014-05-01 Thread sean fallon
Alec,   Not sure if this is what you want but may have found a workaround.   Post the execution of the head(tab) line, if you run dim(tab) you will find that the table contains 1344 rows but only one column i.e. AdjClose   As a workaround, I have added the following lines after your tab-r line  

Re: [R-SIG-Finance] preserving dates in output of tseries

2014-05-01 Thread Chinmay Patil
Try write.zoo function. works out of the box. write.zoo(head(tab)) ## Index AdjClose ## 2008-12-02 0.0377656920201943 ## 2008-12-03 0.0237206482126213 ## 2008-12-04 -0.0234569003540432 ## 2008-12-05 0.0303880024180421 ## 2008-12-08 0.0343235654549394 ## 2008-12-09 -0.0165746208209656 On Fri,