An R package to calculate business days based on holidays.
Questions tagged [bizdays]
27 questions
3
votes
1 answer
R Package bizdays Giving Unexpected Results
I'm attempting to use the bizdays R package in order to calculate the number of business days in the week excluding weekends and holidays.
Below I have a simple examples that evaluates the number of business days between 12/24/2018 and 12/28/2018…

Matt
- 174
- 1
- 2
- 14
2
votes
0 answers
How to get the date of the last business day of the week in R?
I want to know if today is the last business day of this week in R.
I was thinking of using getdate() from Bizdays library, so I created the calendar inputting the holidays in my country.
however, in the next step of actually using getdate()…

Martinus Sulaksono
- 21
- 5
2
votes
2 answers
Calculating business days between two dataframe columns
I have a data frame that contains two POSIXct columns. How can I go about calculating the number of weekdays between these two columns?
df <- data.frame(StartDate=as.POSIXct(c("2017-05-17 12:53:00","2017-08-31 21:16:00","2017-08-25…

Dfeld
- 187
- 9
2
votes
2 answers
R bizdays trouble making it work
Im tring to use the bizdays package to generate a vector with bus days between two dates.
fer = as.data.frame(as.Date(fer[1:938]))
#Define default calendar
bizdays.options$set(default.calendar=fer)
dt1 = as.Date(Sys.Date())
dt2 =…

Alexandre Ludolf
- 196
- 1
- 10
1
vote
1 answer
bizday() not flagging June 20, 2022 (Juneteenth) as NYSE market holiday R
How can I add a missing date when a market was closed to a loaded calendar so I can use the date difference function bizdays() from library(bizdays)?
From NYSE's website:
Juneteenth National Independence Day Monday, June 20, 2022…

Grillo
- 75
- 6
1
vote
0 answers
Bizdays is returning the wrong date. Is my calendar broken?
I'm trying to get previous business days (and previous previous business days) using the bizdays package so that I can use it later. However for some reason the two objects I want to create seem to only returning today's date nomatter what function…

alec22
- 735
- 2
- 12
1
vote
0 answers
Is there a way to use the round date to next trading day while keeping both date and variable columns in R?
How can I round the dates in the date column to the following business day? So each Saturday, Sunday and holiday should be transformed to the following business day. Furthermore, how can we include the output from the other columns as well in the…

Frank_O
- 37
- 5
1
vote
1 answer
Bizdays doesn't exclude weekends
I am trying to calculate utilization rates by relative employee lifespans. I need to assign a total number of hours available to this employee between the earliest and furthest date in which time was recorded. From there I will use this as the…

Rory
- 95
- 1
- 5
1
vote
1 answer
Yield next business day in R
I need to calculate next business day in R with two parameters today's date and a data.frame having list of dates which are holidays
I tried but it's yielding today's date only
> cal <- create.calendar("MyCalendar", holidays =…

Stupid_Intern
- 3,382
- 8
- 37
- 74
1
vote
0 answers
Duration in business days calculation and time overlap in R
I have a table for employees absence dates. I need to calculate absence days( in Business days ) for each employee. I have multiple records for each employee. some of these records are duplicates, embedded or overlapped with other dates or just …

Wisley
- 11
- 2
0
votes
0 answers
r function getdate from bizdays throws error
I have a code that worked for a long time but now it is throwing an error. When I use the function getdate from bizdays I get an error. I don't know if it is some new update, but I can't figure out whats wrong. Here is the error from an example…

Osvaldo Assunção
- 139
- 1
- 12
0
votes
0 answers
NA output usin add.bizdays in R
I create a custom calendar using create.calendar function from bizdays package and a vector with all 2023 year days in vector Date_A. I need to add 8 working days to every day and store it in Date_B, for that reason I used add.bizdays function but…

Israel
- 260
- 3
- 15
0
votes
1 answer
R package bizdays cannot be installed
I have been using bizdays package for a long time and since I changed my window installation recently I had to install all of the packages for R. The only package that is not installed is bizdays. The documentations appear to show this package…

Ibo
- 4,081
- 6
- 45
- 65
0
votes
2 answers
Count bizdays that intersect between lubridate intervals in R
I have a dataset with ~ 330 000 rows. Each observation represents a period where an individual recieved a welfare benefit called "care allowance". The benefit is meant to replace income when the recipient has to be absent from work in order to care…

mgronas_werring
- 53
- 5
0
votes
1 answer
How do I globally load Rmetric Financial calendars into `golem` at the startup?
Question:
What are the best practices to go about setting a "global" financial calendar using load_rmetrics_calenders(),
ie a singular run of a function in golem?
Background:
This question is asked prior to finding a possible solution. I am using a…

JJ Fantini
- 213
- 1
- 11