Browse Source

Corregir error survival.

master
marcelcosta 4 years ago
parent
commit
071b9ab139
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      invivos/app.R

+ 5
- 1
invivos/app.R

@ -521,7 +521,7 @@ server <- function(input, output) {
tableR<-filter(table, `ID tumor` == side) %>% filter(!is.na(Volume))
endtime<-dcast(tableR %>% filter(Volume < cutoff), Cage+`ID animal`+`ID tumor`+Group~., value.var = "Timepoint", fun.aggregate = function(x){max(as.numeric(as.character(x)))}) %>% rename("end"=".")
endtime["Dead"]<-dcast(tableR, Cage+`ID animal`+`ID tumor`+Group~., value.var = "Volume", fun.aggregate = function(x){max(as.numeric(as.character(x)))}) %>% pull(".") > input$cutoff
table_tumor<<-endtime
table_tumor<-endtime
if (input$colors != ""){
col<-input$colors
}else{
@ -544,6 +544,10 @@ server <- function(input, output) {
}else{
col<-gg_color_hue(length(unique(table_tumor$Group)))
}
tableR<-table %>% filter(!is.na(Volume))
endtime<-dcast(tableR %>% filter(Volume < cutoff), `ID animal`+Group~., value.var = "Timepoint", fun.aggregate = function(x){max(as.numeric(as.character(x)))}) %>% rename("end"=".")
endtime["Dead"]<-dcast(tableR, `ID animal`+Group~., value.var = "Volume", fun.aggregate = function(x){max(as.numeric(as.character(x)))}) %>% pull(".") > input$cutoff
table_tumor<-endtime
g<-ggsurvplot(survfit(Surv(table_tumor$end, table_tumor$Dead) ~ table_tumor$Group, data=table_tumor),
pval = T, pval.method = T,
# legend.labs = paste(c("< median", ">= median"), "MICA"),

Loading…
Cancel
Save