Displaying 1 result from an estimated 1 matches for "bidrow".
Did you mean:
idrow
2010 Oct 04
3
Loop too slow for Bid calc - BUT cannot figure out how to do with matrix
...timestamp then getting the previous row price from
BidsMatrix...which would have been the bid at the beginning of that second.
I am new to R, so need some help to do this ?properly?.
# OneSecond. Matrix above called ?One Second Bid Matrix?
# BidsMatrix. Matrix above called ?Bids Matrix?
bidrow = 1
# looping through each second
for (sec in 1:length(OneSecond$Second) )
{
t = as.POSIXlt(onesec$Second[sec],origin = "1970-01-01")
sec.onesec = as.numeric(format(t, "%H%M%S")) # convert date/time to format
HHMMSS as a number
# Find bid for second, which is the...