vec2DateF)==0,TRUE,FALSE)
#[1] TRUE TRUE
A.K.
- Original Message -
From: Martin Batholdy
To: "r-help@r-project.org"
Cc:
Sent: Friday, September 14, 2012 5:44 AM
Subject: [R] compare different data-formats
Hi,
I have two data-frames which I want to match by a date-variable.
T
Hello,
Try the following.
x <- c("14.Aug.2012-16:32", "3.Sep.2012-16:50")
y <- c("2012.08.14", "2012.09.3")
as.Date(x, format = "%d.%b.%Y-%H:%M") == as.Date(y, format = "%Y.%m.%d")
(Or use %in% instead of ==)
But note that the format returned by as.Date uses '-' as separator:
as.Date(x, forma
Hi,
I have two data-frames which I want to match by a date-variable.
The problem now is, that the date-variable has a different format in this two
data-frames.
So simply matching by this variable wouldn't work.
In the one data-frame the date-variable contains strings that look like this:
14.Au
3 matches
Mail list logo