-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from andbe/master
Added plotly support and other fixes to plotting functions
- Loading branch information
Showing
324 changed files
with
7,521 additions
and
39,218 deletions.
There are no files selected for viewing
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ Authors@R: c( | |
role = c("aut", "cre", "cph"), | ||
comment = c(ORCID = "0000-0003-4314-2570")), | ||
person("Andrea", "Berardi", | ||
email = "[email protected]", | ||
email = "[email protected]", | ||
role = c("aut"), | ||
comment = c(ORCID = "0000-0002-2906-496X")), | ||
person("Anna", "Heath", | ||
|
@@ -28,6 +28,7 @@ Imports: | |
MASS, | ||
Matrix, | ||
MCMCvis, | ||
plotly, | ||
purrr, | ||
Rdpack, | ||
reshape2, | ||
|
@@ -42,7 +43,6 @@ Suggests: | |
knitr, | ||
markdown, | ||
mgcv, | ||
plotly, | ||
plotrix, | ||
RColorBrewer, | ||
rjags, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#' @rdname CEriskav.plot | ||
#' | ||
#' @template args-he | ||
#' @param pos Legend position | ||
#' @param graph A string used to select the graphical engine to use for | ||
#' plotting. Should (partial-)match the options `"base"`, | ||
#' `"ggplot2"` or `"plotly"`. Default value is `"base"`. | ||
#' | ||
#' @return \item{plot}{ A ggplot or plot_ly object containing the plot. Returned only | ||
#' if `graph_type="ggplot2"` or `graph_type="plotly"`.} | ||
#' @seealso [bcea()] | ||
#' | ||
#' @references | ||
#' \insertRef{Baio2013}{BCEA} | ||
#' | ||
#' @importFrom grDevices colours | ||
#' | ||
#' @export | ||
#' | ||
CEriskav.plot.CEriskav <- function(he, | ||
pos = "topright", | ||
graph = c("base", "ggplot2", "plotly") | ||
) { | ||
|
||
graph <- match.arg(graph) | ||
# extra_args <- list(...) | ||
|
||
if (is_baseplot(graph)) { | ||
CEriskav_plot_base(he, | ||
pos_legend = pos) | ||
} else if (is_ggplot(graph)) { | ||
CEriskav_plot_ggplot(he, | ||
pos_legend = pos) | ||
} else if (is_plotly(graph)) { | ||
CEriskav_plot_plotly(he, | ||
pos_legend = pos) | ||
} | ||
} | ||
|
||
#' Cost-effectiveness Plot Including a Parameter of Risk Aversion (CEriskav) | ||
#' | ||
#' @template args-he | ||
#' @param pos Legend position | ||
#' @param graph A string used to select the graphical engine to use for | ||
#' plotting. Should (partial-)match the options `"base"`, | ||
#' `"ggplot2"` or `"plotly"`. Default value is `"base"`. | ||
#' @export | ||
#' | ||
CEriskav.plot <- function(he, pos, graph) { | ||
UseMethod('CEriskav.plot', he, pos, graph) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.