search for: rivercode

Displaying 12 results from an estimated 12 matches for "rivercode".

2011 Mar 04
4
xts POSIXct index format
Hi, I cannot figure out how to change the index format when displaying POSIXct objects. Would like the xts index to display as %H:%M:%OS3 when doing viewing the xts object. Think I am missing the obvious. Cheers, Chris -- View this message in context: http://r.789695.n4.nabble.com/xts-POSIXct-index-format-tp3336136p3336136.html Sent from the R help mailing list archive at Nabble.com.
2011 Jan 03
2
Regex to remove last character
Hi, Have been having trouble trying to figure out the right regex parameters to remove the last "." in timestamp with the following format: Convert 09:30:00.377.853 to 09:30:00.377853 Thanks, Chris -- View this message in context: http://r.789695.n4.nabble.com/Regex-to-remove-last-character-tp3172466p3172466.html Sent from the R help mailing list archive at Nabble.com.
2011 Jan 10
2
Aggragating subsets of data in larger vector with sapply
Have 40,000 rows of buy/sell trade data and am trying to add up the buys for each second, the code works but it is very slow. Any suggestions how to improve the sapply function ? secEP = endpoints(xSym$Direction, "secs") # vector of last second on an XTS timeseries object with multiple entries for each second. d = xSym$Direction s = xSym$Size buySize = sapply(1:(length(secEP)-1),
2010 Oct 04
3
Loop too slow for Bid calc - BUT cannot figure out how to do with matrix
Hi, I am trying to create Bid/Ask for each second from a high volume stock and the only way I have been able to solve this is using loops to create the target matrix from the source tick data matrix. Looping is too slow and not practical to use on multiple stocks. For example: Bids Matrix (a real one is 400,000++ length): Bid Time 10.03 11:05:03.124 10.04 11:05:03.348 10.05
2011 Mar 02
1
Create a zoo/xts Time Series with Millisecond jumps
Is there a easy way to create the time index for a zoo/xts object for every 100 milliseconds. eg. time Index would be: 10:00:00:100 10:00:00:200 10:00:00:300 10:00:00:400 I am looking to build an empty zoo/xts object with time index from 10am to 3pm, index jumps by 100ms each row. Thanks, Chris -- View this message in context:
2011 Mar 18
1
Replace split with regex for speed ?
Have timestamp in format HH:MM:SS.MMM.UUU and need to remove the last "." so it is in format HH:MM:SS.MMMUUU. What is the fastest way to do this, since it has to be repeated on millions of rows. Should I use regex ? Currently doing it with a string split, which is slow: >head(ts) [1] 09:30:00.000.245 09:30:00.000.256 09:30:00.000.633 09:30:00.001.309 09:30:00.003.635
2011 Jun 20
1
Vi mode in Linux console - how to stop it ?
Hi, When I am editing a command using default R console in Linux, sometimes it is going into "vi mode"...not too sure how/why this happening. It then requires me to use vi commands to edit the line, which is very frustrating when I just want to use the delete key instead of "x" to delete a character. How do I turn this off ? Thanks, Chris -- View this message in context:
2010 Oct 08
2
Time OffSet From GMT - Losing it
Losing time offset from GMT: > sTime = as.POSIXct(paste("2008-03-03","09:30:01"), origin="1970-01-01") > sTime [1] "2008-03-03 09:30:01 EST" <---- 9.31am EST > sTime [1] 1204554601 > t = as.numeric(sTime) > as.POSIXct(t, origin="1970-01-01") [1] "2008-03-03 14:30:01 EST" <----- no tz option and t is sTime + 5
2011 Jan 04
1
XTS : merge.xts seems to have problem with character vectors
Hi, Please can you tell me what I am doing wrong. When trying to merge two xts objects, one of which has multiple character vectors for columns...I am just getting NAs. > str(t) POSIXct[1:1], format: "2011-01-04 11:45:37" > y2 = xts(matrix(c(letters[1:10]),5), order.by=as.POSIXct(c(t + 1:5))) > names(y2) = c(1,2) > y2 1 2 2011-01-04 11:45:38
2011 Mar 09
3
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Hi, I am processing tick data and my code has stopped working as I have increased the size of data being processed. Now I am receiving error for basic tasks in RConsole: > a = c(1:1000) Error: evaluation nested too deeply: infinite recursion / options(expressions=)? My R code worked fine with 50 stocks and 500,000 rows per stock, but when I increased this to 50 stocks and 5,000,000 rows per
2010 Oct 11
2
Slow reading multiple tick data files into list of dataframes
Hi, I am trying to find the best way to read 85 tick data files of format: > head(nbbo) 1 bid CON 09:30:00.722 09:30:00.722 32.71 98 2 ask CON 09:30:00.782 09:30:00.810 33.14 300 3 ask CON 09:30:00.809 09:30:00.810 33.14 414 4 bid CON 09:30:00.783 09:30:00.810 33.06 200 Each file has between 100,000 to 300,300 rows. Currently doing nbbo.list<-
2010 Oct 07
1
Vector replace 0 elements without using a loop
Hi, With a vector like: x = c (22, 23, 22.5, 0,0,24, 0, 23.2, 23.5, 0,0,0, 26) How can I replace the 0's with the previous last value without looping through the vector ? Something tells me I am missing the obvious. Thanks, Chris -- View this message in context: http://r.789695.n4.nabble.com/Vector-replace-0-elements-without-using-a-loop-tp2966191p2966191.html Sent from the R help