Copy R data to clipboard
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
inst/rstudio
man
.Rbuildignore
.gitignore
DESCRIPTION
NAMESPACE
README.md
copydat.Rproj

README.md

copydat

What is it?

copydat lets you copy a data.frame to the clipboard using the ...

... RStudio GUI. Just highlight (in your source console) the name of the data.frame you want to copy. (Examples: iris; mtcars). Click Addins > Copy data, and you're done.

... R console. Like this: mtcars %>% Copy(dat2tsv) # or dat2rtf. Paste away!

Supported formats:

  • TSV (to paste into a spreadsheet)
  • RTF (to paste into a document or an email)

It's a work in progress. TODO:

  • Support for platforms other than OS X. Just submit a pull request re: clipboard(). Easy! :-D
  • Easy attribution/provenance (comment() --> table caption?)
  • More formats

Thanks to @Rstudio and @kevinushey for RStudio Addins and the great examples. And thanks to @schaffman5 for the rtf package!

Installation

if (!requireNamespace("devtools", quietly = TRUE))
  install.packages("devtools")

devtools::install_github("BAAQMD/copydat")