[R] ISO recommendations for plot output format from R to MS Word / tangential

J C Nash pro|jcn@@h @end|ng |rom gm@||@com
Thu Feb 18 20:48:25 CET 2021


FWIW, even in Rmarkdown images sometimes give trouble. However, there is the possibilty
of asking to keep the latex version of the document after Rmarkdown has been processed.
That is, in the yaml header there is the "output" section

output:
  pdf_document:
    keep_tex: false
    toc: true

Here I have kept_tex NOT active. Change false to true and a .tex file will be produced.
I've found this useful to adjust images and a few other things. Mostly I am happy with
Rmarkdown output, and I have to say such tweaks are quite rare, though I have once or
twice used this feature to track down some non-printing characters in code chunks when
the Rmarkdown processing was fine, but pdflatex choked.

Possibly it is easier to do Latex --> Word. Like many others in the R community, I find
Word an unfortunate annoyance, in particular because I can never be sure really what
is present in a "doc"ument.

Best, J Nash


On 2021-02-18 2:16 p.m., Kevin Thorpe wrote:
> 
>> On Feb 18, 2021, at 2:03 PM, Robert Dodier <robert.dodier using gmail.com> wrote:
>>
>> EXTERNAL EMAIL:
>>
>> On Thu, Feb 18, 2021 at 10:12 AM Kevin Thorpe <kevin.thorpe using utoronto.ca> wrote:
>>
>>> I would think that it would be more seamless to use Rmarkdown.
>>> Simply put the plotting code into an Rmarkdown file and send it
>>> straight to Word. Is there a reason why this is not a viable option?
>>
>> Hi Kevin, thanks for your reply. Well, I started working with Word
>> because at least one other person needs to edit it and they want to
>> use Word. More fundamentally, it's not clear to me that going through
>> Rmarkdown solves the problem of determining the image format -- at
>> some point a figure is going to get generated and then pasted into a
>> Word document. It's not clear that doing that automatically is going
>> to work better or differently than doing it by hand. Anyway I think I
>> have a working solution at this point so I leave it to others to
>> investigate further possibilities.
>>
>> best,
>>
>> Robert Dodier
> 
> Fair enough. I mentioned it since from my limited experience sending to Word
> (I hate Word) the images seem to look fine. Whatever is done seems to work.
> With the Rmarkdown generated Word file, I imagine copy/paste into the “master”
> Document would work just fine.
> 
> Kevin
> 
>



More information about the R-help mailing list