Hi ,
I am trying to convert the date as factor to date using as.date function
in R. I have the date in the following format
2008-01-01 02:30
I tried to use the following command :
as.Date(mydata$Date, format=%y-%m-%d )
Can somebody help me with this ? I was able to convert the
On 19.02.2013 18:47, Janesh Devkota wrote:
Hi ,
I am trying to convert the date as factor to date using as.date function
in R. I have the date in the following format
2008-01-01 02:30
I tried to use the following command :
as.Date(mydata$Date, format=%y-%m-%d )
Can somebody help me
jdbaba wrote
Hi ,
I am trying to convert the date as factor to date using as.date function
in R. I have the date in the following format
2008-01-01 02:30
I tried to use the following command :
as.Date(mydata$Date, format=%y-%m-%d )
Can somebody help me with this
Hello,
Try the following.
x - 2008-01-01 02:30
as.POSIXct(x, format = %Y-%m-%d %H:%M)
Hope this helps,
Rui Barradas
Em 19-02-2013 17:47, Janesh Devkota escreveu:
Hi ,
I am trying to convert the date as factor to date using as.date function
in R. I have the date in the following format
It is possible to squeeze a square peg into a round hole, but often you will
not be satisfied with the result. Date is for... surprise, dates. You may want
to use the chron package or the POSIXct type. The R Journal of June 2004
(Volume 4/1) R Help Desk column is recommended reading.
You need to convert the factor to character.
as.Date( as.character(mydata$Date), %Y-%m-%d)
should do it.
John Kane
Kingston ON Canada
-Original Message-
From: janesh.devk...@gmail.com
Sent: Tue, 19 Feb 2013 11:47:04 -0600
To: r-help@r-project.org
Subject: [R] Converting the data
6 matches
Mail list logo