tomwenseleers / export

R package for streamlined export of graphs and data tables.
192 stars 35 forks source link

graph2ppt error #29

Closed pavitraviswanath closed 4 years ago

pavitraviswanath commented 4 years ago

Thank you for this great package! I am trying to export this image from R studio using graph2ppt but I get this error even though I have the latest version of export installed from gitgub: Error: 'ph_with_vg_at' is defunct. Use 'officer::ph_with' instead.

This is the code I have used to generate my plot: p <- ggboxplot(na.omit(rdf), x = "Group", y = "Value", fill="Group", outlier.shape=NA, alpha=0.7) p <- p + geom_jitter(position=position_jitter(width=0.1,height=0)) p <- p + theme_bw() p <- p + theme(axis.text.x = element_text(size=14), legend.position = "none") p <- p + geom_violin(alpha=0.3, scale = "width", position = position_dodge(width = .3),size=0.5,color = NA,aes(fill=Group)) p <- p + scale_fill_viridis_d(option = "viridis") p <- p + stat_compare_means(comparisons = my_comparisons, size=5, family= "Arial", fontface= "bold")

p <- p + stat_compare_means(label.y=max(rdf$Value,na.rm=T)+5, size=7, family="Arial", fontface= "bold")

p <- p + ylab("Total No. of Tumors") + xlab("") p <- p + theme(text=element_text(family="Arial", face = "bold", size=14)) p <- p + theme(aspect.ratio = 1) plot(p) graph2ppt(x=p, file='FVB.pptx', append=TRUE)

image

cvanderaa commented 4 years ago

This error occured with older versions of the package. Could you rerun your example after installing the latest version of export using:

devtools::install_github("tomwenseleers/export")

If this does not help, could make a reproducible example or supply the rdf object?