0

Trying to use bizdays::create.calendar I am getting the following error

Error in seq.int(0, to0 - from, by) : 'to' must be a finite number

my holiday vector looks like

> arsHol
            V1
1   2018-01-01
2   2018-01-15
3   2018-02-12
4   2018-02-13
5   2018-02-19
6   2018-03-29
7   2018-03-30
8   2018-04-02

and my code is

arsHol
arsHol1<-as.Date.character(arsHol,format="%Y-%m-%d")
arsCal<-bizdays::create.calendar("arsCal",holidays = arsHol1,weekdays=c("saturday", "sunday"))
dmaz
  • 1
  • Could you please share the output of `dput(arsHol)`? My guess is that the issue is actually in the line `arsHol1<-as.Date.character(arsHol,format="%Y-%m-%d")` -- probably replacing `arsHol` with `arsHol$V1` would fix the issue. But we can't know until you share a reproducible version of your data. – josliber Dec 04 '19 at 15:11
  • That worked. arsHol$V1 corrected it – dmaz Dec 04 '19 at 15:21

0 Answers0