Message-ID: <508FC26F.9060206@sapo.pt>
Date: 2012-10-30T12:05:03Z
From: Rui Barradas
Subject: subtract a time period from a date
In-Reply-To: <da0fe68e813f16a23fae69a3398e0f45@beuth-hochschule.de>
Hello,
I don't get it, this seems to work as expected.
d <- as.Date("2011-05-01 CEST")
d - 30
[1] "2011-04-01"
Hope this helps,
Rui Barradas
Em 30-10-2012 10:25, paladini escreveu:
> Hello everybody,
> how can I reduce e.g. 30 days from a date?
> When I do the following "2011-05-01 CEST" -"2011-04-01 CEST" I get:
> "Time difference of 30 days"
> an thats fine.
>
> But when I try "2011-05-01 CEST" - 30 I get nonsense.
> So how can I subtract some days, month or years from a date?
>
>
>
> thanking you in anticipation
>
>
> Claudia Paladini
>
> ______________________________________________
> 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.