Corrección bug operados.

This commit is contained in:
2023-12-12 17:31:18 +01:00
parent 092a788125
commit d9a5689c99
+7 -6
View File
@@ -439,6 +439,7 @@ server <- function(input, output) {
table %>% group_by(Group, DayPostInoc, Side) %>% count() %>% spread(DayPostInoc, n)
}
})
output$cin_group<-renderPlot({
if (!is.null(input$file_analy) & !is.null(analysis$taula)){
observeEvent(analysis$taula, {})
@@ -469,7 +470,7 @@ server <- function(input, output) {
deadmice<-filter(table, !is.na(substr(Observations,1,1)) & substr(Observations,1,1) == "+") %>%
pull(Animal)
print(deadmice)
if (input$operated == TRUE){
if (input$operated == TRUE & nrow(firstoper) > 0){
for (i in 1:nrow(firstoper)){
table<-table %>% filter(DayPostInoc < firstoper$FirstOper[i] | Side != firstoper$Side[i])
}
@@ -494,7 +495,7 @@ server <- function(input, output) {
pull(DayPostInoc) %>% min(na.rm = T)
print(firstoper)
if (input$operated == TRUE){
if (input$operated == TRUE & nrow(firstoper) > 0){
table<-table %>% filter(DayPostInoc < firstoper)
}else{
deadmice<-filter(table, !is.na(substr(Observations,1,1)) & substr(Observations,1,1) == "+") %>%
@@ -542,7 +543,7 @@ server <- function(input, output) {
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){
if (input$operated == TRUE & nrow(firstoper) > 0){
for (i in 1:nrow(firstoper)){
table<-table %>% filter(DayPostInoc < firstoper$FirstOper[i] | Side != firstoper$Side[i])
}
@@ -567,7 +568,7 @@ server <- function(input, output) {
pull(DayPostInoc) %>% min(na.rm = T)
print(firstoper)
if (input$operated == TRUE){
if (input$operated == TRUE & nrow(firstoper) > 0){
table<-table %>% filter(DayPostInoc < firstoper)
}else{
deadmice<-filter(table, !is.na(substr(Observations,1,1)) & substr(Observations,1,1) == "+") %>%
@@ -598,7 +599,7 @@ server <- function(input, output) {
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){
if (input$operated == TRUE & nrow(firstoper) > 0){
for (i in 1:nrow(firstoper)){
table<-table %>% filter(DayPostInoc < firstoper$FirstOper[i] | Side != firstoper$Side[i])
}
@@ -639,7 +640,7 @@ server <- function(input, output) {
pull(DayPostInoc) %>% min(na.rm = T)
print(firstoper)
if (input$operated == TRUE){
if (input$operated == TRUE & nrow(firstoper) > 0){
table<-table %>% filter(DayPostInoc < firstoper)
}else{
deadmice<-filter(table, !is.na(substr(Observations,1,1)) & substr(Observations,1,1) == "+") %>%