From 372da36791cbdb7ad7d6841ed991e55b36f77e06 Mon Sep 17 00:00:00 2001 From: Sandro Raabe Date: Fri, 19 Feb 2021 19:09:06 +0100 Subject: [PATCH] activate vignettes --- NEWS.md | 10 +++++----- R/hc_vistime.R | 5 +++++ R/plot_highchart.R | 5 ----- README.md | 6 ++---- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/NEWS.md b/NEWS.md index c20611f..8bf3a77 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# vistime 1.2.0 (2021-02-18) +# vistime 1.2.0 (2021-02-19) ## Breaking Changes - `highcharter` is no more installed by default when you install `vistime`. @@ -8,11 +8,11 @@ ## New features - Added mouse zooming capability to `hc_vistim()e` -- Split the `README.md` into three vignettes + - [`gg_vistime()` manual](https://CRAN.R-project.org/package=vistime/vignettes/gg_vistime-vignette.html) + - [`hc_vistime()` manual](https://CRAN.R-project.org/package=vistime/vignettes/hc_vistime-vignette.html) + ## Minor adjustments - Updated documentation diff --git a/R/hc_vistime.R b/R/hc_vistime.R index 88f251c..99cac72 100644 --- a/R/hc_vistime.R +++ b/R/hc_vistime.R @@ -70,6 +70,11 @@ hc_vistime <- function(data, optimize_y = TRUE, title = NULL, show_labels = TRUE, ...) { + if (!requireNamespace("highcharter", quietly = TRUE)) { + stop("The `highcharter` package is required for creating `hc_vistime()` objects.", + call. = FALSE) + } + checked_dat <- validate_input(data, col.event, col.start, col.end, col.group, col.color, col.fontcolor = NULL, col.tooltip, optimize_y, linewidth = 0, title, show_labels, background_lines = 0, list(...)) diff --git a/R/plot_highchart.R b/R/plot_highchart.R index bae23ca..8d64fcc 100644 --- a/R/plot_highchart.R +++ b/R/plot_highchart.R @@ -19,11 +19,6 @@ #' } plot_highchart <- function(data, title, show_labels){ - if (!requireNamespace("highcharter", quietly = TRUE)) { - stop("The `highcharter` package is required for creating `hc_vistime()` objects.", - call. = FALSE) - } - # let an event be 1/50th of total timeline range data$end <- with(data, ifelse(start != end, end, end + diff(range(c(start, end)))/50)) diff --git a/README.md b/README.md index 850dd7d..b8c1fea 100644 --- a/README.md +++ b/README.md @@ -106,13 +106,11 @@ During COVID-19 2020, [wlhamilton](https://github.com/wlhamilton) used `gg_visti -