Skip to content

Instantly share code, notes, and snippets.

@nassimhaddad
Last active December 11, 2015 04:29
Show Gist options
  • Save nassimhaddad/4545519 to your computer and use it in GitHub Desktop.
Save nassimhaddad/4545519 to your computer and use it in GitHub Desktop.
read data from clipboard, works with excel
# windows
x <- read.delim(file("clipboard","r"),
header=TRUE,
stringsAsFactors = FALSE)
# mac
data <- read.table(pipe("pbpaste"), sep="\t", header=T)
# read from and write to clipboard with Kmisc (windows + OS X):
library(Kmisc)
read.cb(sep = "\t")
write.cb(df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment