4
$\begingroup$

I would like to put an output from R to my appendix in my thesis; however when I pasted it to Word, the columns were moved.

Do you have any idea how to adjust it to be exactly the same as in R? so that it is easier to read

$\endgroup$
  • 1
    $\begingroup$ This question appears to be off-topic because it is about the use of R. Please review advice about software-related questions in the help center. Nor is it really suitable for posting on Stack Overflow. You could try an R forum. $\endgroup$ – Nick Cox Mar 16 '14 at 10:57
  • 1
    $\begingroup$ Besides the good solution offered, you can simply paste to word and then format it as any monospace font (e.g. courier new, consolas, and many others). The output won't look as pretty, but it does look rather like the session you took it from and it's a lot faster -- and in many cases quite adequate $\endgroup$ – Glen_b -Reinstate Monica Mar 16 '14 at 11:29
  • 2
    $\begingroup$ This question appears to be off-topic because it is about correctly formatting monospaced output in Word. $\endgroup$ – Glen_b -Reinstate Monica Mar 16 '14 at 11:31
  • $\begingroup$ Kniter is a neat little R package for generating html-based reports if you are interested in doing more that exporting a dataframe. $\endgroup$ – RioRaider Mar 16 '14 at 13:57
8
$\begingroup$

This question would better fit to Stackoverflow. However, you could export the dataframe (df) with write.csv(df, "clipboard", row.names = FALSE) to the clipboard. Paste it in Excel and copy this to Word. You now should have a table in Word.

$\endgroup$
  • 1
    $\begingroup$ There is also the R xlsx package. $\endgroup$ – Andre Silva Mar 16 '14 at 11:10
  • $\begingroup$ Right. Thank you very much, biologue and Andre Silva. Sorry for putting this topic here. $\endgroup$ – user3288202 Mar 16 '14 at 11:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.