[R] Fwd: Cannot generate a *.docx file
bgunter.4567 at gmail.com
Sun May 14 22:26:23 CEST 2017
Sorry, no clue.
If you don't get a satisfactory reply here, you should contact the
maintainer, David Gohel
<david.gohel at lysis-consultants.fr> .
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sun, May 14, 2017 at 12:30 PM, Yves S. Garret
<yoursurrogategod at gmail.com> wrote:
> I'm using R 3.4.0.
> ---------- Forwarded message ----------
> From: Yves S. Garret <yoursurrogategod at gmail.com>
> Date: Sun, May 14, 2017 at 2:35 PM
> Subject: Cannot generate a *.docx file
> To: r-help <r-help at r-project.org>
> I have the following code example:
> # Create a word document to contain R outputs
> doc <- docx()
> # Add a title to the document
> doc <- addTitle(doc, "Simple Word document", level = 1)
> # Add a paragraph of text into the Word document
> cat("Output 1\n")
> doc <- addParagraph(doc, "This.")
> cat("Output 2\n")
> # Write the Word document to a file
> writeDoc(doc, file = "r-reporters-simple-word-document.docx")
> When I run it, this is what I see:
> Output 1
> Error in UseMethod("addParagraph") :
> no applicable method for 'addParagraph' applied to an object of class
> Why? The library loads as it should. So why am I getting the above error?
> Thanks in advance.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help