File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,11 @@ if (getRversion() < 3.3) {
6
6
absolute.units.unit.list <- getFromNamespace(" absolute.units.unit.list" , " grid" )
7
7
absolute.units.unit.arithmetic <- getFromNamespace(" absolute.units.unit.arithmetic" , " grid" )
8
8
9
- .onLoad <- function (... ) {
9
+ backport_unit_methods <- function () {
10
10
registerS3method(" absolute.units" , " unit" , absolute.units.unit )
11
11
registerS3method(" absolute.units" , " unit.list" , absolute.units.unit.list )
12
12
registerS3method(" absolute.units" , " unit.arithmetic" , absolute.units.unit.arithmetic )
13
13
}
14
+ } else {
15
+ backport_unit_methods <- function () {}
14
16
}
Original file line number Diff line number Diff line change 16
16
})
17
17
}
18
18
19
+ .onLoad <- function (... ) {
20
+ backport_unit_methods()
21
+
22
+ # To avoid namespace clash with dplyr.
23
+ # It seems surprising that this hack works
24
+ if (requireNamespace(" dplyr" , quietly = TRUE )) {
25
+ vars <<- dplyr :: vars
26
+ }
27
+ }
28
+
19
29
release_questions <- function () {
20
30
c(
21
31
" Have you built the book?"
You can’t perform that action at this time.
0 commit comments