On Dec 31, 2009, at 5:46 PM, William Dunlap wrote:
mytable$duration <- mytable$end_time - mytable$start_time
mytable
start_time end_time duration
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-01-01 01:27:00 2010-01-10 15:27:00 828000 secs
12 2010-01-01 02:27:00 2010-01-11 15:27:00 910800 secs
okay, that's cool.
periods$sql <- sprintf("select * from data where start_time >= periods
$start_time and start_time <= periods$end_time")
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.