Copy R Objects to Clipboard

R Quick Tips

I was today years old when I learned that you could easily copy/paste R objects to your clipboard.

Javier Orraca (Scatter Podcast)

You learn something new every day, even basics! For R users on Windows (I’m assuming the same holds true for Mac and Linux users), do you ever find yourself needing to quickly export a dataframe or tibble to Excel or a text editor? I recently discovered base R’s write.table function and have used it much more often than I anticipated.

See below syntax as an example:

base R’s write.table


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Orraca (2020, Feb. 8). Javier Orraca: Copy R Objects to Clipboard. Retrieved from

BibTeX citation

  author = {Orraca, Javier},
  title = {Javier Orraca: Copy R Objects to Clipboard},
  url = {},
  year = {2020}