-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample_effect_plotly.R
42 lines (42 loc) · 1.47 KB
/
example_effect_plotly.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#' @examples
#' library(plotly)
#' z$error_up <- z$ucl - z$estimate
#' z$error_down <- z$estimate - z$lcl
#' plot_ly(
#' z, y = ~effect, x = ~estimate, type = "scatter", mode = "none",
#' error_x = list(type = "data", array = ~error_up, arrayminus = ~error_down)
#' ) |>
#' add_classification(lcl = ~lcl, ucl = ~ucl, threshold = 1) |>
#' layout(
#' shapes = reference_shape(threshold = 1, horizontal = FALSE)
#' )
#' plot_ly(
#' z, y = ~effect, x = ~estimate, type = "scatter", mode = "none",
#' error_x = list(type = "data", array = ~error_up, arrayminus = ~error_down)
#' ) |>
#' add_classification(
#' lcl = ~lcl, ucl = ~ucl, threshold = 1, detailed = FALSE
#' ) |>
#' layout(
#' shapes = reference_shape(threshold = 1, horizontal = FALSE)
#' )
#' plot_ly(
#' z, y = ~effect, x = ~estimate, type = "scatter", mode = "none",
#' error_x = list(type = "data", array = ~error_up, arrayminus = ~error_down)
#' ) |>
#' add_classification(
#' lcl = ~lcl, ucl = ~ucl, threshold = 1, signed = FALSE
#' ) |>
#' layout(
#' shapes = reference_shape(threshold = 1, horizontal = FALSE)
#' )
#' plot_ly(
#' z, y = ~effect, x = ~estimate, type = "scatter", mode = "none",
#' error_x = list(type = "data", array = ~error_up, arrayminus = ~error_down)
#' ) |>
#' add_classification(
#' lcl = ~lcl, ucl = ~ucl, threshold = 1, detailed = FALSE, signed = FALSE
#' ) |>
#' layout(
#' shapes = reference_shape(threshold = 1, horizontal = FALSE)
#' )