|
@ -46,6 +46,7 @@ ui <- fluidPage( |
|
|
uiOutput('cutoffUI'), |
|
|
uiOutput('cutoffUI'), |
|
|
checkboxInput("filter_stats","Filtrar Estadística"), |
|
|
checkboxInput("filter_stats","Filtrar Estadística"), |
|
|
checkboxInput("increase_volume","Usar Incremento de Volumen"), |
|
|
checkboxInput("increase_volume","Usar Incremento de Volumen"), |
|
|
|
|
|
checkboxInput("operated","Cortar al operar", value = TRUE), |
|
|
downloadButton("downloadVolume", "Descargar Volúmenes") |
|
|
downloadButton("downloadVolume", "Descargar Volúmenes") |
|
|
), |
|
|
), |
|
|
mainPanel( |
|
|
mainPanel( |
|
@ -448,7 +449,18 @@ server <- function(input, output) { |
|
|
Observations="" |
|
|
Observations="" |
|
|
) |
|
|
) |
|
|
table<-rbind(table, basal) |
|
|
table<-rbind(table, basal) |
|
|
|
|
|
|
|
|
if (input$vacc == "Sí"){ |
|
|
if (input$vacc == "Sí"){ |
|
|
|
|
|
firstoper<- filter(table, !is.na(substr(Observations,1,1)) & substr(Observations,1,1) == "*") %>% |
|
|
|
|
|
select(DayPostInoc, Side) %>% unique() %>% |
|
|
|
|
|
group_by(Side) %>% summarise(FirstOper=min(DayPostInoc)) |
|
|
|
|
|
|
|
|
|
|
|
if (input$operated == TRUE){ |
|
|
|
|
|
for (i in 1:nrow(firstoper)){ |
|
|
|
|
|
table<-table %>% filter(DayPostInoc < firstoper$FirstOper[i] | Side != firstoper$Side[i]) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
ggplot(table, aes(DayPostInoc, Volume, color=Group, group=Group))+ |
|
|
ggplot(table, aes(DayPostInoc, Volume, color=Group, group=Group))+ |
|
|
geom_errorbar(stat="summary", width=0.05)+ |
|
|
geom_errorbar(stat="summary", width=0.05)+ |
|
|
geom_line(stat="summary")+ |
|
|
geom_line(stat="summary")+ |
|
@ -459,6 +471,15 @@ server <- function(input, output) { |
|
|
scale_x_continuous(expand = expansion(mult = c(0,0.05)), limits = c(0, (round(max(table$DayPostInoc) / 5)+1)*5))+ |
|
|
scale_x_continuous(expand = expansion(mult = c(0,0.05)), limits = c(0, (round(max(table$DayPostInoc) / 5)+1)*5))+ |
|
|
theme_bw() |
|
|
theme_bw() |
|
|
}else{ |
|
|
}else{ |
|
|
|
|
|
|
|
|
|
|
|
firstoper<- filter(table, !is.na(substr(Observations,1,1)) & substr(Observations,1,1) == "*") %>% |
|
|
|
|
|
pull(DayPostInoc) %>% min(na.rm = T) |
|
|
|
|
|
print(firstoper) |
|
|
|
|
|
|
|
|
|
|
|
if (input$operated == TRUE){ |
|
|
|
|
|
table<-table %>% filter(DayPostInoc < firstoper) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
ggplot(table, aes(DayPostInoc, Volume, color=Group, group=Group))+ |
|
|
ggplot(table, aes(DayPostInoc, Volume, color=Group, group=Group))+ |
|
|
geom_errorbar(stat="summary",width=0.05)+ |
|
|
geom_errorbar(stat="summary",width=0.05)+ |
|
|
geom_line(stat="summary")+ |
|
|
geom_line(stat="summary")+ |
|
@ -681,6 +702,15 @@ server <- function(input, output) { |
|
|
if (input$fig_id %in% c("Cinética Grupo", "Cinética Individual")){ |
|
|
if (input$fig_id %in% c("Cinética Grupo", "Cinética Individual")){ |
|
|
if (input$fig_id == "Cinética Grupo"){ |
|
|
if (input$fig_id == "Cinética Grupo"){ |
|
|
if (input$vacc == "Sí"){ |
|
|
if (input$vacc == "Sí"){ |
|
|
|
|
|
firstoper<- filter(table, !is.na(substr(Observations,1,1)) & substr(Observations,1,1) == "*") %>% |
|
|
|
|
|
select(DayPostInoc, Side) %>% unique() %>% |
|
|
|
|
|
group_by(Side) %>% summarise(FirstOper=min(DayPostInoc)) |
|
|
|
|
|
|
|
|
|
|
|
if (input$operated == TRUE){ |
|
|
|
|
|
for (i in 1:nrow(firstoper)){ |
|
|
|
|
|
table<-table %>% filter(DayPostInoc < firstoper$FirstOper[i] | Side != firstoper$Side[i]) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
std<-function(x, na.rm=T){sd(x, na.rm=na.rm)/sqrt(length(x))} |
|
|
std<-function(x, na.rm=T){sd(x, na.rm=na.rm)/sqrt(length(x))} |
|
|
errbar<-table %>% group_by(Group,Side,DayPostInoc) %>% |
|
|
errbar<-table %>% group_by(Group,Side,DayPostInoc) %>% |
|
|
summarise(mean=mean(Volume, na.rm=T), std=std(Volume)) %>% |
|
|
summarise(mean=mean(Volume, na.rm=T), std=std(Volume)) %>% |
|
@ -700,6 +730,13 @@ server <- function(input, output) { |
|
|
geom_segment(data=errbar, aes(y=mean+std, yend=mean+std, |
|
|
geom_segment(data=errbar, aes(y=mean+std, yend=mean+std, |
|
|
x=x,xend=xend)) |
|
|
x=x,xend=xend)) |
|
|
}else{ |
|
|
}else{ |
|
|
|
|
|
firstoper<- filter(table, !is.na(substr(Observations,1,1)) & substr(Observations,1,1) == "*") %>% |
|
|
|
|
|
pull(DayPostInoc) %>% min(na.rm = T) |
|
|
|
|
|
print(firstoper) |
|
|
|
|
|
|
|
|
|
|
|
if (input$operated == TRUE){ |
|
|
|
|
|
table<-table %>% filter(DayPostInoc < firstoper) |
|
|
|
|
|
} |
|
|
std<-function(x, na.rm=T){sd(x, na.rm=na.rm)/sqrt(length(x))} |
|
|
std<-function(x, na.rm=T){sd(x, na.rm=na.rm)/sqrt(length(x))} |
|
|
errbar<-table %>% group_by(Group, DayPostInoc) %>% |
|
|
errbar<-table %>% group_by(Group, DayPostInoc) %>% |
|
|
summarise(mean=mean(Volume, na.rm=T), std=std(Volume)) %>% |
|
|
summarise(mean=mean(Volume, na.rm=T), std=std(Volume)) %>% |
|
|