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@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@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.
>
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O
[[alternative HTML version deleted]]