|
13 | 13 | register_s3_method("ggplot2", "scale_type", "agg_vec") |
14 | 14 |
|
15 | 15 | # fabletools -> ggtime method migration |
16 | | - ggtime_version <- package_version(as.character( |
17 | | - suppressWarnings( |
18 | | - utils::packageDescription("ggtime", fields = "Version") |
19 | | - ) |
| 16 | + ggtime_version <- as.character(suppressWarnings( |
| 17 | + utils::packageDescription("ggtime", fields = "Version") |
20 | 18 | )) |
21 | 19 | if (!is.na(ggtime_version) && isFALSE(as.logical(Sys.getenv("R_PACKAGE_BUILDING")))) { |
22 | 20 | ggtime_ns <- getNamespace("ggtime") |
23 | 21 |
|
24 | 22 | register_s3_method("ggplot2", "autoplot", "tbl_ts", utils::getS3method("autoplot", "tbl_ts", envir = ggtime_ns)) |
25 | 23 | register_s3_method("ggplot2", "autolayer", "tbl_ts", utils::getS3method("autolayer", "tbl_ts", envir = ggtime_ns)) |
26 | 24 | register_s3_method("ggplot2", "autoplot", "dcmp_ts", utils::getS3method("autoplot", "dcmp_ts", envir = ggtime_ns)) |
27 | | - if (ggtime_version >= "0.2.0") { |
| 25 | + if (package_version(ggtime_version) >= "0.2.0") { |
28 | 26 | register_s3_method("ggplot2", "autoplot", "fbl_ts", utils::getS3method("autoplot", "fbl_ts", envir = ggtime_ns)) |
29 | 27 | register_s3_method("ggplot2", "autolayer", "fbl_ts", utils::getS3method("autolayer", "fbl_ts", envir = ggtime_ns)) |
30 | 28 | register_s3_method("ggplot2", "fortify", "tbl_ts", utils::getS3method("fortify", "fbl_ts", envir = ggtime_ns)) |
|
0 commit comments