|
@@ -139,12 +139,11 @@ get.ggplot<-function(df,dfRef,var,timeVar='visitid',doseVar='dose',
|
|
|
|
|
|
|
|
ghigh<-base::sprintf("%s_high",var)
|
|
ghigh<-base::sprintf("%s_high",var)
|
|
|
glow<-base::sprintf("%s_low",var)
|
|
glow<-base::sprintf("%s_low",var)
|
|
|
- xV<-.data[[timeVar]]
|
|
|
|
|
ggplot2::ggplot()+
|
|
ggplot2::ggplot()+
|
|
|
- ggplot2::geom_ribbon(ggplot2::aes(x=xV,ymin=.data[[glow]],ymax=.data[[ghigh]]),dfRef,fill='grey70')+
|
|
|
|
|
- ggplot2::geom_ribbon(ggplot2::aes(x=xV,ymin=.data[[glow]],ymax=.data[[ghigh]],fill=base::as.factor(.data[[doseVar]])),df,alpha=0.2)+
|
|
|
|
|
- ggplot2::geom_line(ggplot2::aes(x=xV,y=.data[[var]]),dfRef)+
|
|
|
|
|
- ggplot2::geom_line(ggplot2::aes(x=xV,y=.data[[var]],color=base::as.factor(.data[[doseVar]])),df)+
|
|
|
|
|
|
|
+ ggplot2::geom_ribbon(ggplot2::aes(x=.data[[timeVar]],ymin=.data[[glow]],ymax=.data[[ghigh]]),dfRef,fill='grey70')+
|
|
|
|
|
+ ggplot2::geom_ribbon(ggplot2::aes(x=.data[[timeVar]],ymin=.data[[glow]],ymax=.data[[ghigh]],fill=base::as.factor(.data[[doseVar]])),df,alpha=0.2)+
|
|
|
|
|
+ ggplot2::geom_line(ggplot2::aes(x=.data[[timeVar]],y=.data[[var]]),dfRef)+
|
|
|
|
|
+ ggplot2::geom_line(ggplot2::aes(x=.data[[timeVar]],y=.data[[var]],color=base::as.factor(.data[[doseVar]])),df)+
|
|
|
ggplot2::scale_color_manual(name = "Dose", breaks = doseBreaks, values = doseColors,labels=doseLabels)+
|
|
ggplot2::scale_color_manual(name = "Dose", breaks = doseBreaks, values = doseColors,labels=doseLabels)+
|
|
|
ggplot2::scale_fill_manual(name = "Dose", breaks = doseBreaks, values = doseColors,labels=doseLabels)+
|
|
ggplot2::scale_fill_manual(name = "Dose", breaks = doseBreaks, values = doseColors,labels=doseLabels)+
|
|
|
ggplot2::theme(legend.position="bottom")+
|
|
ggplot2::theme(legend.position="bottom")+
|