Browse Source

Corregir un pequeño error con el cálculo del último día vivo.

master
Costa 2 years ago
parent
commit
4346d2fb1a
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      invivos/app.R

+ 2
- 1
invivos/app.R

@ -474,7 +474,8 @@ server <- function(input, output) {
}else{
tableR<-table %>% filter(!is.na(Volume))
endtime<-dcast(tableR, `ID animal`+`ID tumor`+Group~., value.var = "Timepoint", fun.aggregate = function(x){max(as.numeric(as.character(x)))}) %>% rename("end"=".")
endtime<-dcast(if(length(unique(tableR$Timepoint)) > 1){tableR %>% filter(Volume < input$cutoff)}else{tableR}, `ID animal`+`ID tumor`+Group~.,
value.var = "Timepoint", fun.aggregate = function(x){max(as.numeric(as.character(x)))}) %>% rename("end"=".")
endtime["Dead"]<-dcast(tableR, `ID animal`+`ID tumor`+Group~., value.var = "Volume", fun.aggregate = function(x){max(as.numeric(as.character(x)))}) %>% pull(".") >= input$cutoff
table_tumor<<-endtime

Loading…
Cancel
Save