

# if you use ggplot like function you don't need to transform the format # it to ggplot object when you are working on the platform without GUI # if you use basic plot function or other plot function you need first use convertplot to convert Tofigure(ggplot(mtcars, aes(mpg, disp, color = factor(cyl))) + geom_point(),filename = "mtcars.eps") Tofigure(ggplot(mtcars, aes(mpg, disp, color = factor(cyl))) + geom_point(),filename = "mtcars.pdf") Tabs <- inpptx(filename = "mtcars.pptx", header = TRUE)

# inpptx and indocx provide function read the tables in pptx or docx Totable(t.test(wt ~ am, mtcars), filename = "mtcars_test.pptx") Totable(tt, filename = "mtcars_test.pptx") # Now support direct output of common objects produced by R statistical functions # append was supported if you want add figures or tables. Totable(head(mtcars), filename = "mtcars.pptx") Totable(head(mtcars), filename = "mtcars.docx") # use above method if you want use topptx with ggplot function in a loop Topptx(p, filename = "mtcars.pptx", width = 6, height = 4) P <- ggplot(mtcars, aes(mpg, disp, color = factor(cyl))) + geom_point() Ggplot(mtcars, aes(mpg, disp, color = factor(cyl))) + geom_point() If you can't install the ImageMagick you can go with eoffice 0.1.6 version Installation On Fedora or CentOS/RHEL we need ImageMagick-c++-devel: On Debian/Ubuntu this is called libmagick++-dev: For linux platform please install imageMagick to use the infigure function. eoffice provides function to extract colors from figures with different formats or pdf files. Since people may work on the platform without GUI support, eoffice also provide function to easily write out figures to all above formats, pptx and docx.

eoffice also support write out or display ggplot2 type figure with plotly. Export and import graphics and tables to MicroSoft office DescriptionĮoffice provide wrap functions to export and import graphics and ames in R to MicroSoft office with fully editable figures and tables(docx, pptx format).Īnd eoffice also provide write out figures with lots of different formats, such as pdf, eps, emf, tiff, svg, wmf, png and jpeg.
