doseresNMA antidep/drnma.plot.doseDist.R

# dose distribution per drug
require(dplyr)
dose_dist <- function(data=antidep){
  data2 <- data[data$drug!='placebo',]
  data2$tindex <- as.factor(as.numeric(factor(data2$drug)))
  ggplot(data = data2, aes(x=drug, y=dose)) +
    facet_wrap( ~ drug, scales="free")+
    xlab('agent')+
    geom_dotplot(binaxis='y', stackdir='center', dotsize=3,col='orange')+
    theme(axis.text.x=element_blank(),
          axis.ticks.x=element_blank())
}
htx-r/doseresNMA documentation built on Jan. 28, 2021, 5:32 a.m.