ences in mins
[1] 10 10
attr(,"tzone")
[1] ""
A.K.
- Original Message -
From: Rantony
To: r-help@r-project.org
Cc:
Sent: Thursday, June 14, 2012 6:08 AM
Subject: [R] Time difference between two dates/timing
Hi,
Here, i have a matrix like this
MyMatrix <-
*D
"%d/%m/%Y %H:%M"))
diff(dtime[,1])
John Kane
Kingston ON Canada
> -Original Message-
> From: antony.akk...@ge.com
> Sent: Thu, 14 Jun 2012 03:08:25 -0700 (PDT)
> To: r-help@r-project.org
> Subject: [R] Time difference between two dates/timing
>
> Hi,
>
You have been asked before (by me!) to give reproducible examples
using dput()...
You might need the diff() function.
Michael
On Thu, Jun 14, 2012 at 5:08 AM, Rantony wrote:
> Hi,
>
>
> Here, i have a matrix like this
>
> MyMatrix <-
>
> *DATETIME HEADER1 HEADER2*
> 1/1/2010 0
Hi,
Here, i have a matrix like this
MyMatrix <-
*DATETIMEHEADER1HEADER2*
1/1/2010 0:10 197.1947 100.0859
1/1/2010 0:20 203.8811 100.1013
1/1/2010 0:30 206.564 100.0433
1/1/2010 0:40 207.9563
thank you! this really helps!
On Thu, Apr 22, 2010 at 7:00 PM, jim holtman wrote:
> ?strptime
>
> Read the documentation and you will find reference to "%OSn"
>
> > x <- strptime('13:45:34.123', format="%H:%M:%OS")
> > x
> [1] "2010-04-22 13:45:34"
> > format(x, format="%H:%M:%OS3")
> [1] "13:45
Carol Gao gmail.com> writes:
>
> Hi,
>
> Does anyone know how to take a time difference when the format of the time
> is as 13:22:23.586? I am trying to take the difference of time between stock
> transactions and need to keep the three decimal places for seconds. I have
> tried *diff(strptime(
?strptime
Read the documentation and you will find reference to "%OSn"
> x <- strptime('13:45:34.123', format="%H:%M:%OS")
> x
[1] "2010-04-22 13:45:34"
> format(x, format="%H:%M:%OS3")
[1] "13:45:34.123"
>
On Thu, Apr 22, 2010 at 2:58 AM, Carol Gao wrote:
> Hi,
>
> Does anyone know how to ta
Hi,
Does anyone know how to take a time difference when the format of the time
is as 13:22:23.586? I am trying to take the difference of time between stock
transactions and need to keep the three decimal places for seconds. I have
tried *diff(strptime(x, "%H:%M:%S.000))*, but apperantly that doesn
On 22 July 2009 at 09:44, Erin Hodgess wrote:
| I am looking at the ctime attribute of two different files. It
| contains the year, month, day, time of creation and time zone.
[ Well only if you convert it to POSIXlt... ]
| Is there a way to determine the difference between the ctimes of two
|
Try this:
> file.info("abc.R")$ctime - file.info("aa.R")$ctime
Time difference of 228.9912 days
On Wed, Jul 22, 2009 at 10:44 AM, Erin Hodgess wrote:
> Dear R People:
>
> I am looking at the ctime attribute of two different files. It
> contains the year, month, day, time of creation and time zo
On Wednesday, July 22, 2009 10:44 AM, Erin Hodgess wrote:
> ...I am looking at the ctime attribute of
> two different files. It contains the year,
> month, day, time of creation and time zone.
> Is there a way to determine the difference
> between the ctimes of two files, please...
a
Dear R People:
I am looking at the ctime attribute of two different files. It
contains the year, month, day, time of creation and time zone.
Is there a way to determine the difference between the ctimes of two
files, please?
I looked in the chron package and nothing seemed to work.
Thanks in a
If what you have is a character string, then convert it to POSIXlt and
use difftime:
> x1
[1] "Wed Mar 18 12:18:11 2009"
> x2
[1] "Wed Mar 18 12:18:18 2009"
> x1.c <- strptime(x1, "%a %b %d %H:%M:%S %Y")
> x2.c <- strptime(x2, "%a %b %d %H:%M:%S %Y")
> difftime(x2.c, x1.c, units='secs')
Time diffe
Dear all,
I have two variables which contents are date() function answers, like:
d1<-date()
d2<-date()
Now I need to compute the difference between d2 and d1 (in minutes).
Any help are welcome.
Best wishes
miltinho
brazil
[[alternative HTML version deleted]]
Hi,
I am computing some time differences.
Using the linux version of R 2.7.1
And I am getting a strange result ( see below )
I need the difference in minutes.
Actually looking for where it is NOT 15 minutes.
Would anyone know why this could be happening?
Or should I do this another way?
Bill
Th
I think the error message says it all. "fix" can not handle the data
type of tdiff:
> tdiff <-structure(c(168, NA, NA, 165, 175, 140, 191, 195, 130, 160, 135,
+ 165, 330, 178, 141, NA, 119, 90, 70, 99, 115, 70, 65, 90, 90, 65, 90, 75,
+ 85, 93, 52, 75, 60, 90, 105, 70, 65, 60, 85, 110, 65, 60,
Hello!
I posted this question earlier but it seems that something went wrong, so I
post it again.
I have a problem making a new variabel in a dataframe that consists of a time
difference. It seems that the new variable gets into the dataframe but I cant
look at it anymoore. Here is what happens.
Hello!
I have a problem making a new variabel in a dataframe that consists of a time
difference.
It seems that the new variable gets into the dataframe but I cant look at it
anymoore.
Here is what hapens.
> tdiff<- difftime(Kontrolltid, Starttid, units="auto")> tdiffTime differences
> i
18 matches
Mail list logo