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
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Gabor Grothendieck
> Sent: Thursday, December 31, 2009 3:15 PM
> To: donahc...@me.com
> Cc: r-help@r-project.org
> Subject: Re: [R] iterating over a
Here are a couple of R-type commands on a data.frame.
>>
>> mydata <- data.frame(vec1 = seq(19,109, by=10),
>> vec2 =seq(30,120, by=10))
>>
>> mydata[,1]+mydata[,2]
>> apply(mydata, 2, mean)
>>
>>
>>
>> --- On Thu, 12/31/09, donahc...@me
nt to do to it/them?
Here are a couple of R-type commands on a data.frame.
mydata <- data.frame(vec1 = seq(19,109, by=10),
vec2 =seq(30,120, by=10))
mydata[,1]+mydata[,2]
apply(mydata, 2, mean)
--- On Thu, 12/31/09, donahc...@me.com wrote:
From: donahc...@me.com
Subject: [R] iterati
me.com
> Subject: [R] iterating over a data frame the R way?
> To: r-help@r-project.org
> Received: Thursday, December 31, 2009, 2:44 PM
> 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
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
6 matches
Mail list logo