Cambio de formato de la cinética individual.
This commit is contained in:
+28
-10
@@ -432,29 +432,47 @@ server <- function(input, output) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
output$cin_indiv<-renderPlot({
|
output$cin_indiv<-renderPlot({
|
||||||
if (!is.null(input$file_analy) & !is.null(analysis$taula_def)){
|
if (!is.null(input$file_analy) & !is.null(analysis$taula)){
|
||||||
observeEvent(analysis$taula_def, {})
|
observeEvent(analysis$taula, {})
|
||||||
table<-analysis$taula_def
|
table<-analysis$taula
|
||||||
print(table)
|
|
||||||
|
animals<-unique(table$Animal)
|
||||||
|
sides<-unique(table$Side)
|
||||||
|
groups<-table %>% select(Animal, Group) %>% unique() %>% pull(Group)
|
||||||
|
basal<-data.frame(
|
||||||
|
Cage="",
|
||||||
|
Animal=rep(animals, each=length(sides)),
|
||||||
|
Date="",
|
||||||
|
DayPostInoc=0,
|
||||||
|
Group=rep(groups, each=length(sides)),
|
||||||
|
Side=rep(sides, length(animals)),
|
||||||
|
Weight="",
|
||||||
|
Long="",
|
||||||
|
Wide="",
|
||||||
|
Volume=0,
|
||||||
|
Observations=""
|
||||||
|
)
|
||||||
|
table<-rbind(table, basal)
|
||||||
|
|
||||||
if (input$vacc == "Sí"){
|
if (input$vacc == "Sí"){
|
||||||
ggplot(table, aes(as.numeric(as.character(Timepoint)), Volume, color=Group, group=`ID animal`))+
|
ggplot(table, aes(DayPostInoc, Volume, color=Group, group=Animal))+
|
||||||
# geom_errorbar(stat="summary", width=0.05)+
|
# geom_errorbar(stat="summary", width=0.05)+
|
||||||
geom_line()+
|
geom_line()+
|
||||||
geom_point()+
|
geom_point()+
|
||||||
scale_y_continuous(expand = expansion(mult = c(0,0.05)))+
|
scale_y_continuous(expand = expansion(mult = c(0,0.05)))+
|
||||||
scale_x_continuous(expand = expansion(mult = c(0,0.05)), limits = c(0, (round(max(as.numeric(as.character(table$Timepoint))) / 5)+1)*5))+
|
scale_x_continuous(expand = expansion(mult = c(0,0.05)), limits = c(0, (round(max(table$DayPostInoc) / 5)+1)*5))+
|
||||||
facet_grid(factor(`ID tumor`, labels = c("Vaccination", "Rechallenge"))~Group, scale="free_y")+
|
facet_grid(factor(Side, labels = c("Vaccination", "Rechallenge"))~Group, scale="free_y")+
|
||||||
labs(x="Days after tumor challenge")+
|
labs(x="Days after tumor inoculation")+
|
||||||
theme_bw()
|
theme_bw()
|
||||||
}else{
|
}else{
|
||||||
ggplot(table, aes(Timepoint, Volume, color=Group, group=paste0(`ID animal`, `ID tumor`)))+
|
ggplot(table, aes(DayPostInoc, Volume, color=Group, group=paste0(Animal, Side)))+
|
||||||
# geom_errorbar(stat="summary", width=0.05)+
|
# geom_errorbar(stat="summary", width=0.05)+
|
||||||
geom_line()+
|
geom_line()+
|
||||||
geom_point()+
|
geom_point()+
|
||||||
scale_y_continuous(expand = expansion(mult = c(0,0.05)))+
|
scale_y_continuous(expand = expansion(mult = c(0,0.05)))+
|
||||||
# scale_x_continuous(expand = expansion(mult = c(0,0.05)), limits = c(0, (round(max(as.numeric(as.character(table$Timepoint))) / 5)+1)*5))+
|
# scale_x_continuous(expand = expansion(mult = c(0,0.05)), limits = c(0, (round(max(as.numeric(as.character(table$Timepoint))) / 5)+1)*5))+
|
||||||
facet_wrap(.~Group)+
|
facet_wrap(.~Group)+
|
||||||
labs(x="Days after tumor challenge")+
|
labs(x="Days after tumor inoculation")+
|
||||||
theme_bw()+
|
theme_bw()+
|
||||||
theme(axis.text.x=element_text(angle=45, hjust=1))
|
theme(axis.text.x=element_text(angle=45, hjust=1))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user