-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathui.R
90 lines (78 loc) · 2.08 KB
/
ui.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
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
# Define UI for data upload app ----
ui <- fluidPage(
# App title ----
titlePanel("Diversidade"),
helpText("Cálculo dos índices de diversidade de espécies"),
# Sidebar layout with input and output definitions ----
sidebarLayout(
# Sidebar panel for inputs ----
sidebarPanel(
# Input: Select a file ----
fileInput(
"file1",
"Importar arquivo .csv",
multiple = TRUE,
accept = c("text/csv",
"text/comma-separated-values,text/plain",
".csv")
),
# Horizontal line ----
tags$hr(),
# Input: Checkbox if file has header ----
checkboxInput("header", "Cabeçalho", TRUE),
# Input: Select separator ----
radioButtons(
"sep",
"Separador",
choices = c(
"Ponto e vírgula" = ";",
"Vígula" = ",",
"Tabulação" = "\t"
),
selected = ";"
),
# Input: Select quotes ----
# radioButtons(
# "quote",
# "Definição de texto:",
# choices = c(
# "Ausente" = "",
# "Aspas duplas" = '"',
# "Aspas simples" = "'"
# ),
# selected = '"'
# ),
# Horizontal line ----
tags$hr(),
# Input: Select number of rows to display ----
radioButtons(
"disp",
"Modo de exibição",
choices = c(
"Mostrar somente as primeiras linhas" = "head",
"Mostrar todos os registros" = "all"
),
selected = "head"
),
# Horizontal line ----
tags$hr(),
radioButtons(
"base",
"Base de logaritmo usada no índice de Shannon",
choices = c(
"Bits/indv." = "2",
"Nats/indv." = "exp(1)",
"Decits/indv." = "10"
)
) ,
actionButton("btn_calcular", "Calcular!")
),
# Main panel for displaying outputs ----
mainPanel(tabsetPanel(
tabPanel("Entrada de dados",
tableOutput("input_data")),
tabPanel("Resultado",
tableOutput("results"))
))
)
)