[R] previous business day
Li, Jing Yi
jingyi.li at credit-suisse.com
Thu Oct 21 22:20:04 CEST 2010
Yeah, thanks Henrique for the code. It works! But I also have the
questions for the holidays.
Please follow the attached hyperlink to an important disclosure:
http://www.credit-suisse.com/legal/marketcommentary
-----Original Message-----
From: Clint Bowman [mailto:clint at ecy.wa.gov]
Sent: Thursday, October 21, 2010 4:16 PM
To: Henrique Dallazuanna
Cc: Li, Jing Yi; r-help at r-project.org
Subject: Re: [R] previous business day
May also wish to "or" in a check for holidays.
--
Clint Bowman INTERNET: clint at ecy.wa.gov
Air Quality Modeler INTERNET: clint at math.utah.edu
Department of Ecology VOICE: (360) 407-6815
PO Box 47600 FAX: (360) 407-7534
Olympia, WA 98504-7600
On Thu, 21 Oct 2010, Henrique Dallazuanna wrote:
> Try this:
>
> f <- function(d)if(format(d - 1, '%w') %in% c(0, 6)) Recall(d - 1)
> else d -
> 1
> d <- Sys.Date()
> f(d)
>
> On Thu, Oct 21, 2010 at 5:38 PM, Li, Jing Yi
<jingyi.li at credit-suisse.com>wrote:
>
>> How to get the previous business day in R? I saw some post about
>> using functions in timeSeries package before but can not find it
anymore.
>> Thanks!
>>
>>
>>
>>
>> =====================================================================
>> ========== Please access the attached hyperlink for an important
>> el...{{dropped:8}}
>>
>> ______________________________________________
>> 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.
>>
>
>
>
>
===============================================================================
Please access the attached hyperlink for an important el...{{dropped:4}}
More information about the R-help
mailing list