Corregir problema con estadística.

This commit is contained in:
Costa
2021-07-14 11:15:48 +02:00
parent 73102c13e2
commit b9d77ac3f2
+2 -11
View File
@@ -132,7 +132,7 @@ server <- function(input, output) {
dades$maps<<-t_maps dades$maps<<-t_maps
} }
if (length(unique(dades$taula %>% pull(Groups))) < 2){ if (length(unique(dades$taula %>% pull(Groups))) < 2){
dades$stats<<-1 dades$stats<<-null
} }
c(ctrl, mock)[c(ctrl, mock) %in% colnames(t_substr)] c(ctrl, mock)[c(ctrl, mock) %in% colnames(t_substr)]
@@ -183,22 +183,13 @@ server <- function(input, output) {
observeEvent(dades$stats, {}) observeEvent(dades$stats, {})
t_stats<-dades$stats t_stats<-dades$stats
if (!is.null(dades$stats)){ if (!is.null(dades$stats)){
if (t_stats == 1){
validate(
need(t_stats == 1, "Con un sólo grupo no se puede hacer estadística")
)
}else{
return(
t_stats %>% t_stats %>%
flextable() %>% flextable() %>%
theme_vanilla() %>% theme_vanilla() %>%
fontsize(size=14, part="all") %>% fontsize(size=14, part="all") %>%
padding(padding=10, part="all") %>% padding(padding=10, part="all") %>%
color(~ p.adj < 0.05, color = "red")%>% color(~ p.adj < 0.05, color = "red")%>%
autofit() autofit() %>% htmltools_value()
) %>%
htmltools_value()
}
} }
}) })