The Goods

Paste as tribble



Paste as vector



Introducing datapasta

datapasta is about reducing resistance associated with copying and pasting data into R Studio. It is a response to the realisation that I often found myself using Sublime as an intermediate text munging step when copying data. Hopefully addins in this package will remove such intermediate steps from our copy-pasta workflows.

At the moment this package contains functional versions of these R Studio addins: * tribble_paste() which pastes a table on the clipboard as a nicely formatted call to tibble::tribble() - Recomend ctrl + shift + t as shortcut. - Table can be delimited with tab, comma, pipe or semicolon. * vector_paste() which will paste delimited data as a vector definition, e.g. c("a", "b") etc. - Recommend ctrl + alt + shift + v as shortcut. * vector_paste_vertical() which will paste delimited data as a vertically formatted vector definition. - Recommend ctrl + shift + v as shortcut - example output:





  1. Get the package: devtools::install_github("milesmcbain/datapasta")
  2. Set the keyboard shortcuts using Tools -> Addins -> Browse Addins, then click Keyboard Shortcuts...

Prior art

This package is made possible by [mdlincon's clipr](, and Hadley's packages tibble and readr (for data-type guessing). I especially appreciate clipr's thoughtful approach to the clipboard on Linux, which pretty much every other R clipboard package just nope'd out on.

Future developments

I'm looking at ways to address the pitfalls. The next thing I will look at is some kind of support on RStudio server, since I use this often myself. Feel free to contribute your ideas for solving these problems to the open issues.