File: bivariate_customize.R

package info (click to toggle)
r-cran-shinystan 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 3,172 kB
  • sloc: sh: 15; makefile: 7
file content (161 lines) | stat: -rw-r--r-- 4,634 bytes parent folder | download | duplicates (2)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
shinyjs::hidden(
  div(id = "bivariate_options",
      wellPanel(
        class = "optionswell",
        hr(class = "hroptions"),
        strongBig("Transformation"),
        transform_helpText("x,y"),
        fluidRow(
          column(width = 3, transformation_selectInput("bivariate_transform_x")),
          column(width = 3, transformation_selectInput("bivariate_transform_y")),
          column(
            width = 2,
            actionButton("bivariate_transform_go", label = "Transform", class = "transform-go")
          )
        ),
        hr(class = "hroptions"),
        selectInput(
          "bivariate_options_display",
          label = strongBig("Control"),
          choices = c("Points", "Ellipse", "Lines"),
          selected = "Points",
          width = "50%"
        ),
        conditionalPanel(
          condition = "input.bivariate_options_display == 'Points'",
          fluidRow(
            column(
              width = 3,
              colourpicker::colourInput("bivariate_pt_color", strongMed("Color"), base_fill)
            ),
            column(
              width = 2,
              numericInput(
                "bivariate_pt_size",
                strongMed("Size"),
                value = 3.5,
                min = 0,
                max = 10,
                step = 0.5
              )
            ),
            column(
              width = 2,
              numericInput(
                "bivariate_pt_shape",
                strongMed("Shape"),
                value = 10,
                min = 1,
                max = 10,
                step = 1
              )
            ),
            column(
              width = 2,
              sliderInput(
                "bivariate_pt_alpha",
                strongMed("Opacity"),
                value = alpha_calc_pt(.nIter),
                min = 0,
                max = 1,
                step = 0.01,
                ticks = FALSE
              )
            )
          )),
        conditionalPanel(
          condition = "input.bivariate_options_display == 'Ellipse'",
          fluidRow(
            column(
              width = 2,
              selectizeInput(
                inputId = "bivariate_ellipse_lev",
                label = strongMed("Type"),
                selected = "None",
                choices = list(
                  "None" = "None",
                  "50%" = 0.5,
                  "80%" = 0.8,
                  "95%" = 0.95,
                  "99%" = 0.99
                )
              )
            ),
            column(
              width = 3,
              colourpicker::colourInput(
                "bivariate_ellipse_color",
                strongMed("Color"),
                vline_base_clr
              )
            ),
            column(
              width = 2,
              numericInput(
                "bivariate_ellipse_lwd",
                strongMed("Size"),
                value = 1,
                min = 0,
                max = 5,
                step = 0.5
              )
            ),
            column(
              width = 2,
              numericInput(
                "bivariate_ellipse_lty",
                strongMed("Shape"),
                value = 1,
                min = 1,
                max = 6,
                step = 1
              )
            ),
            column(
              width = 2,
              sliderInput(
                "bivariate_ellipse_alpha",
                strongMed("Opacity"),
                value = 1,
                min = 0,
                max = 1,
                step = 0.01,
                ticks = FALSE
              )
            )
          )
        ),
        conditionalPanel(
          condition = "input.bivariate_options_display == 'Lines'",
          fluidRow(
            column(
              width = 2,
              selectizeInput(
                inputId = "bivariate_lines",
                label = strongMed("Position"),
                choices = c(Hide = "hide", Back = "back", Front = "front"),
                selected = "back"
              )
            ),
            column(
              width = 3,
              colourpicker::colourInput("bivariate_lines_color", strongMed("Color"), "gray")
            ),
            column(
              width = 2,
              sliderInput(
                "bivariate_lines_alpha",
                label = strongMed("Opacity"),
                value = alpha_calc_lines(.nIter),
                min = 0,
                max = 1,
                step = 0.01,
                ticks = FALSE
              )
            )
          )
        )
      )
  )
)