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)
02-08-2020

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

Reuse

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 ...".

Citation

For attribution, please cite this work as

Orraca (2020, Feb. 8). Javier Orraca: Copy R Objects to Clipboard. Retrieved from https://www.javierorraca.com/posts/2020-02-08-R-write-table/

BibTeX citation

@misc{orraca2020copy,
  author = {Orraca, Javier},
  title = {Javier Orraca: Copy R Objects to Clipboard},
  url = {https://www.javierorraca.com/posts/2020-02-08-R-write-table/},
  year = {2020}
}