-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
I try to update my package {rjd3toolkit} and work with {devtools}.
But I have the impression that load_all() doesn't load the java .jar files (inside inst/java):
devtools::load_all()
BE <- national_calendar(list(
fixed_day(7, 21),
special_day("NEWYEAR"),
special_day("CHRISTMAS"),
special_day("MAYDAY"),
special_day("EASTERMONDAY"),
special_day("ASCENSION"),
special_day("WHITMONDAY"),
special_day("ASSUMPTION"),
special_day("ALLSAINTSDAY"),
special_day("ARMISTICE")
))
q <- holidays(BE, "2021-01-01", 366 * 10, type = "All")
#> Error in .jcall("jdplus/toolkit/base/r/calendar/Calendars", "Ljdplus/toolkit/base/api/timeseries/calendars/Calendar;", :
#> RcallMethod: cannot determine object class
#> Calls: holidays -> .p2jd_calendar -> .jcallCreated on 2025-03-19 with reprex v2.1.1
The solution I found is to first load the package with library() then call load_all when I update a R script. But it doesn't work when updating the inst folder:
library("rjd3toolkit")
#>
#> Attaching package: 'rjd3toolkit'
#> The following objects are masked from 'package:stats':
#>
#> aggregate, mad
devtools::load_all()
BE <- national_calendar(list(
fixed_day(7, 21),
special_day("NEWYEAR"),
special_day("CHRISTMAS"),
special_day("MAYDAY"),
special_day("EASTERMONDAY"),
special_day("ASCENSION"),
special_day("WHITMONDAY"),
special_day("ASSUMPTION"),
special_day("ALLSAINTSDAY"),
special_day("ARMISTICE")
))
q <- holidays(BE, "2021-01-01", 366 * 10, type = "All")
head(q)
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
#> 2021-01-01 0 1 0 0 0 0 0 0 0 0
#> 2021-01-02 0 0 0 0 0 0 0 0 0 0
#> 2021-01-03 0 0 0 0 0 0 0 0 0 0
#> 2021-01-04 0 0 0 0 0 0 0 0 0 0
#> 2021-01-05 0 0 0 0 0 0 0 0 0 0
#> 2021-01-06 0 0 0 0 0 0 0 0 0 0Created on 2025-03-19 with reprex v2.1.1
Do you have a solution?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels