Message-ID: <1385651426.18660.YahooMailNeo@web142606.mail.bf1.yahoo.com>
Date: 2013-11-28T15:10:26Z
From: arun
Subject: date format
In-Reply-To: <BLU170-W299FA391A7F1D53D87F7F189EE0@phx.gbl>
Hi,
Try:
dat1 <- data.frame(years=rep(1991:1992,12), months=rep(1:12,2),days= rep(1,24))
?dat1$day <- format(as.Date(paste(dat1[,1],sprintf("%02d",dat1[,2]),sprintf("%02d",dat1[,3]),sep="."),"%Y.%m.%d"),"%d.%m.%Y")
A.K.
On Thursday, November 28, 2013 8:56 AM, eliza botto <eliza_botto at hotmail.com> wrote:
Dear Users of R,
I have a data frame with three column, the first column contains years, the second one months and third one, the days (cbind(yyyy mm dd)). I want to combine them so that i have one column with the date format as (dd.mm.yyyy).
Is there a way of doing that.
Thanks in advance,
Eliza ??? ??? ??? ? ??? ??? ?
??? [[alternative HTML version deleted]]
______________________________________________
R-help at 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.