File size: 4,526 Bytes
defa05d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
library(shiny)
library(markdown)

shinyUI(pageWithSidebar(
  headerPanel(title=HTML("Prueba de hip贸tesis para la proporci贸n P"),
              windowTitle="PH proporci贸n"),
  sidebarPanel(
    h5('Esta aplicaci贸n realiza la prueba de hip贸tesis para la 

       proporci贸n de una variable cualitativa.'),
    
    h6('La aplicaci贸n usa una base de datos de ejemplo pero el usuario

       puede cargar su propia base de datos.'),
    
    fileInput(inputId='file1',
              label='Use el siguiente bot贸n para cargar su base de datos.',
              accept = c(
                'text/csv',
                'text/comma-separated-values',
                'text/tab-separated-values',
                'text/plain',
                '.csv',
                '.tsv'
              )),
    
    checkboxInput(inputId='header',
                  label='驴Tiene encabezado la base de datos?', 
                  value=TRUE),
    
    selectInput(inputId="sep",
                label = "驴Cu谩l es la separaci贸n de los datos?", 
                choices = list(Tab='\t', Comma=',',
                               Semicolon=';', 'Space'=' '),
                selected = ';'),
    
    selectInput(inputId="variable", 
                label=p("Elija la variable",
                        span("cualitativa", style = "color:red"),
                        "para realizar la prueba de hip贸tesis."),
                choices="placeholder1"),
    
    selectInput(inputId="niveles", 
                label=p("Elija un",
                        span("nivel", style = "color:blue"),
                        "de la variable cualitativa anterior para

                        realizar la prueba."), 
                choices="placeholder2"),
    
    numericInput(inputId='p0', 
                 label=HTML("Ingrese el valor de referencia

                            p<sub>0</sub> para probar

                            H<sub>0</sub>: p = p<sub>0</sub>"), 
                 value=0.17, min=0, max=1, step=0.01),
    
    selectInput(inputId="h0", 
                label=HTML("Elija la hip贸tesis alternativa

                          < , &ne; o >"), 
                choices=list("Menor" = "less", 
                             "Diferente" = "two.sided",
                             "Mayor" = "greater"),
                selected = "two.sided"),
    
    checkboxInput(inputId="correct", 
                  label="Marque si desea usar factor de correci贸n", 
                  value=TRUE, width=NULL),
    
    sliderInput(inputId='alfa',
                label=HTML("Opcional: elija un nivel de confianza para 

                construir el intervalo de confianza para la proporci贸n P;"),
                min=0.90, max=0.99,
                value=0.95, step=0.01),
    
    img(src="https://raw.githubusercontent.com/fhernanb/fhernanb.github.io/refs/heads/main/my_docs/logo_unal_shiny.png", 
        height = 60, width = 120),
    img(src="https://raw.githubusercontent.com/fhernanb/fhernanb.github.io/refs/heads/main/my_docs/logo_udea_shiny.png", 
        height = 25, width = 70),
    img(src="https://raw.githubusercontent.com/fhernanb/fhernanb.github.io/refs/heads/main/my_docs/logo_cua_shiny.png", 
        height = 40, width = 110),
    br(),
    tags$a(href="https://srunal.github.io", "https://srunal.github.io")

),

mainPanel(
  tabsetPanel(type = "pills",
              
              tabPanel("Resultados",
                       h4('- Diagrama de barras para la variable

                          seleccionada.'),
                       plotOutput("appPlot",
                                  width='500px',
                                  height='300px'),
                       
                       h4("- Tabla resumen de las base de datos:"),
                       tableOutput("consolidado"),
                       
                       h4("- Resultados de la prueba de hip贸tesis:"),
                       textOutput("resul1"),
                       
                       h4(HTML("- Intervalo de confianza para la proporci贸n P:")),
                       textOutput("resul2")),
              
              tabPanel("Datos", 
                       "A continuaci贸n los datos que est谩 usando 

                       la aplicaci贸n.",
                       uiOutput('inputData')),
              
              tabPanel("Teor铆a", includeHTML("include.html"))
              
  )
)
  
))