Skip to content

Instantly share code, notes, and snippets.

@FvD
Created August 26, 2015 22:44
Show Gist options
  • Save FvD/3379b72d9300f5aa937d to your computer and use it in GitHub Desktop.
Save FvD/3379b72d9300f5aa937d to your computer and use it in GitHub Desktop.
A clipboard function for R using xclip on ubuntu
# from http://stackoverflow.com/questions/10959521/how-to-write-to-clipboard-on-ubuntu-linux-in-r
clipboard <- function(x, sep="\t", row.names=FALSE, col.names=TRUE){
con <- pipe("xclip -selection clipboard -i", open="w")
write.table(x, con, sep=sep, row.names=row.names, col.names=col.names)
close(con)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment