reporters

Render data file into a formatted word document in R

时光怂恿深爱的人放手 提交于 2020-12-04 09:28:02
问题 I have a csv file such as this: data <- data.frame(First = c("John", "Hui", "Jared"), Second = c("Smith", "Chang", "Jzu"), Sport = c("Football","Soccer","Ballet"), Age = c("12", "13", "12"), submission = c("Microbes may be the friends of future colonists living off the land on the moon, Mars or elsewhere in the solar system and aiming to establish self-sufficient homes. Space colonists, like people on Earth, will need what are known as rare earth elements, which are critical to modern

Render data file into a formatted word document in R

风流意气都作罢 提交于 2020-12-04 09:26:15
问题 I have a csv file such as this: data <- data.frame(First = c("John", "Hui", "Jared"), Second = c("Smith", "Chang", "Jzu"), Sport = c("Football","Soccer","Ballet"), Age = c("12", "13", "12"), submission = c("Microbes may be the friends of future colonists living off the land on the moon, Mars or elsewhere in the solar system and aiming to establish self-sufficient homes. Space colonists, like people on Earth, will need what are known as rare earth elements, which are critical to modern

Render data file into a formatted word document in R

懵懂的女人 提交于 2020-12-04 09:25:00
问题 I have a csv file such as this: data <- data.frame(First = c("John", "Hui", "Jared"), Second = c("Smith", "Chang", "Jzu"), Sport = c("Football","Soccer","Ballet"), Age = c("12", "13", "12"), submission = c("Microbes may be the friends of future colonists living off the land on the moon, Mars or elsewhere in the solar system and aiming to establish self-sufficient homes. Space colonists, like people on Earth, will need what are known as rare earth elements, which are critical to modern

Inserting an image or pdf into a word document in R

安稳与你 提交于 2020-04-14 08:47:45
问题 Im working with a loop that creates many tables etc. and exports it into word documents with ReporteRs package. So for example I then have a word document with many pages of different graphs, tables and text. I want to insert an image (or pdf - either is fine) into it through the loop (since the loop produces many different word documents). I have downloaded the ImageMagick and magick packages to work with the images. Now I have my image in R, but I cant figure out how to add it to my

Render rCharts using ReporteRs package in powerpoint

梦想与她 提交于 2020-01-16 13:18:08
问题 I can renderchart in R shiny by below code: output$example=renderChart2({ p1 <- nPlot(mpg ~ wt, group = 'cyl', data = mtcars, type = 'multiBarChart') p1 }) Now, I want the same thing in ppt. by using ReporteRs package.I have tried below code but it is not working library(ReporteRs) doc =pptx( ) doc <- addSlide(doc, "Two Content") plotFunc<- function(){ nPlot(mpg ~ wt, group = 'cyl', data = mtcars, type = 'multiBarChart') } doc <- addPlot(doc, fun =print, x = plotFunc) writeDoc(doc, "r-2.pptx"

R save FlexTable as html file in script

蹲街弑〆低调 提交于 2019-12-25 12:56:22
问题 I have a FlexTable produced with the ReporteRs package which I would like to export as .html. When I print the table to the viewer in RStudio I can do this by clicking on 'Export' and selecting 'Save as webpage'. How would I replicate this action in my script? I don't want to knit to a html document or produce a report just yet as at present I just want separate files for each of my draft tables which I can share with collaborators (but nicely formatted so they are easy to read). I have tried

Writing doc output to pdf

巧了我就是萌 提交于 2019-12-23 04:57:21
问题 Hello fellow R enthusiasts, I am wondering whether we can create a pdf version from docx within R (not using other conversion tools). I create a docx report using ReporteRs package. I would like to make a copy of that in pdf copy. Is it possible within R, without using any external softwares? Thank you in advance. 回答1: Here is one way to do it. Disclaimer: This answer came up in google group of ReporteRs . writeDoc( doc, file = docfile) system(paste("libreoffice --headless --convert-to pdf ",

Displaying multiple tables using Package officer and flextable

非 Y 不嫁゛ 提交于 2019-12-23 01:24:09
问题 I was wondering if it might be possible to display more than one flextable in the HTML format (on a single page) using flextable and officer ? library('flextable') library('officer') dat1 <- data.frame(Approaches = c("Y", "Y", "N"), Meets = c("N", "Y", "N"), row.names = c("Read", "Math", "Sci.")) dat2 <- data.frame(Read = "Y", Math = "N") def_par <- fp_par(text.align = "center") def_txt <- fp_text(bold = TRUE) ft <- flextable(dat1, cwidth = c(3.2, 3.2)) # Table #1 ft <- style(ft, pr_p = def

How to save a plot as image on disk from Viewer in RStudio?

一世执手 提交于 2019-12-13 14:27:04
问题 Summary: my ultimate goal is to use rCharts , and specifically Highcharts , as part of a ReporteRs PowerPoint report automation workflow. One of the charts I would like to use is rendered as html in the Viewer pane in Rstudio, and addPlot(function() print(myChart)) does not add it to the PowerPoint. As a workaround, I decided to try to save myChart to disk, from where I could just add it to the PowerPoint that way. So my question is really, How do I get my html image into my ReporteRs

error when generating html document with ggplots on remote R server using ReporteRs package(.:18048): Gtk-WARNING **: cannot open display:

巧了我就是萌 提交于 2019-12-12 05:12:38
问题 I installed ReporteRs package on a remote linux server and try to generate HTML pages with it. It works fine, but when trying to add a ggplot to the document it gives this error: (.:18048): Gtk-WARNING **: cannot open display: I used the solution for these kinds of problems mentioned here, (running "export DISPLAY=:0.0", before running R), but there still is an error. Now it says: (.:19674): Gtk-WARNING **: cannot open display: :0.0 Now I am wondering if there is a way to alter the addPlot()