On 08/02/2013, e-letter inp...@gmail.com wrote:
Readers,
For a 12 hour time stamp:
testtime-(2013-01-01 01:00:01 PM)
testtime
[1] 2013-01-01 01:00:01 PM
testtime24hour-strftime(testtime,'%H:%M:%S')
testtime24hour
[1] 01:00:01
Have realised that the object is of type 'character'. When
Readers,
Have since tried to plot converted 24 hour data:
testtimedataset
V1
1 13:01:41
2 13:02:10
3 13:02:38
4 13:03:05
5 13:03259
testdata-seq(1:5)
plot(testdata~testtimedataset)
Error in function (formula, data = NULL, subset = NULL, na.action = na.fail, :
invalid type (list)
Hello,
You're trying to plot the df, not the column. Try
plot(testdata ~ testtimedataset$V1)
Hope this helps,
Rui Barradas
Em 11-02-2013 13:30, e-letter escreveu:
Readers,
Have since tried to plot converted 24 hour data:
testtimedataset
V1
1 13:01:41
2 13:02:10
3 13:02:38
4
Hi
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of e-letter
Sent: Monday, February 11, 2013 2:31 PM
To: r-help@r-project.org
Subject: Re: [R] convert 12 time stamp to 24 hour
Readers,
Have since tried to plot converted
On 11/02/2013, PIKAL Petr petr.pi...@precheza.cz wrote:
str(testtimedataset)
With my real data set, revealed that after conversion, the time series
data consists of 'chr' which I guess means character type data,
reporting the following error:
Error in plot.window(...) : need finite 'xlim'
Hi
-Original Message-
From: e-letter [mailto:inp...@gmail.com]
Sent: Monday, February 11, 2013 3:11 PM
To: PIKAL Petr
Cc: r-help@r-project.org
Subject: Re: [R] convert 12 time stamp to 24 hour
On 11/02/2013, PIKAL Petr petr.pi...@precheza.cz wrote:
str(testtimedataset
Readers,
For a 12 hour time stamp:
testtime-(2013-01-01 01:00:01 PM)
testtime
[1] 2013-01-01 01:00:01 PM
testtime24hour-strftime(testtime,'%H:%M:%S')
testtime24hour
[1] 01:00:01
how to convert to 24 hour format so that the object 'testtime24hour' is:
'13:00:01'
Thanks.
--
r2151
Hello,
Try this:
testtime-(2013-01-01 01:00:01 PM)
strptime(testtime, %Y-%m-%d %I:%M:%S %p)
[1] 2013-01-01 13:00:01
HTH,
Pascal
Le 08/02/2013 18:44, e-letter a écrit :
Readers,
For a 12 hour time stamp:
testtime-(2013-01-01 01:00:01 PM)
testtime
[1] 2013-01-01 01:00:01 PM
-
From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
project.org] On Behalf Of Pascal Oettli
Sent: Friday, February 08, 2013 11:08 AM
To: e-letter
Cc: r-help@r-project.org
Subject: Re: [R] convert 12 time stamp to 24 hour
Hello,
Try this:
testtime-(2013-01-01 01:00:01 PM
Hi,
library(lubridate)
ymd_hms(testtime)
1 parsed with %Y-%m-%d %I:%M:%S %p
#[1] 2013-01-01 13:00:01 UTC
A.K.
- Original Message -
From: e-letter inp...@gmail.com
To: r-help@r-project.org
Cc:
Sent: Friday, February 8, 2013 4:44 AM
Subject: [R] convert 12 time stamp to 24 hour
10 matches
Mail list logo