Re: [R] need more help.... Re: iterating over a data frame the R way?

2010-01-01 Thread donahchoo
Hum. data.frame was left off. Trying again... On Jan 1, 2010, at 10:20 AM, donahc...@me.com wrote: Okay, I don't know if I'm blocking because of my other programming language experience of if I'm just being dense. I have a data.frame with high,open,low,last,day, and start_time time c

[R] need more help.... Re: iterating over a data frame the R way?

2010-01-01 Thread donahchoo
Okay, I don't know if I'm blocking because of my other programming language experience of if I'm just being dense. I have a data.frame with high,open,low,last,day, and start_time time columns. What I want to do is get all the rows with the same day and process each of those columns. If I

Re: [R] iterating over a data frame the R way?

2009-12-31 Thread donahchoo
On Dec 31, 2009, at 5:46 PM, William Dunlap wrote: mytable$duration <- mytable$end_time - mytable$start_time mytable start_timeend_timeduration 1 2009-12-31 15:27:00 2009-12-31 15:27:00 0 secs 2 2009-12-31 16:27:00 2010-01-01 15:27:00 82800 secs ... 11 2010

Re: [R] iterating over a data frame the R way?

2009-12-31 Thread donahchoo
In this specific case I'm going to do another select, from a different table with the where clause being based on the start_time and end_time. select * from table_name where time >= start_time and time <= end_time; On Dec 31, 2009, at 3:57 PM, John Kane wrote: Uh what do you want to do to i

[R] iterating over a data frame the R way?

2009-12-31 Thread donahchoo
Hi, I have a data frame that was create by issuing a select against my sqlite database. I want to get each row from the data frame and use the each of the column values. The data frame looks like this: start_timeend_time 09:30:00 10:00:00 10:00:01 10:30:00 etc Can a point m

Re: [R] what don't I get about numeric/double comparisons in R way?

2009-12-30 Thread donahchoo
On Dec 30, 2009, at 10:10 PM, Jim Lemon wrote: On 12/31/2009 02:41 PM, donahc...@me.com wrote: Hi, I'm pretty much an R noob and I'm missing some paradigm in R I think. I can't figure our how to compare numerics. here's a transcript of my tests. Any pointers?

[R] what don't I get about numeric/double comparisons in R way?

2009-12-30 Thread donahchoo
Hi, I'm pretty much an R noob and I'm missing some paradigm in R I think. I can't figure our how to compare numerics. here's a transcript of my tests. Any pointers? > print(range_sd) [1] 34.40783 > is.numeric(range_sd) [1] TRUE > is.numeric(foo) [1] TRUE > is.double(range_sd) [1] TRUE >