Created
August 26, 2015 22:44
-
-
Save FvD/3379b72d9300f5aa937d to your computer and use it in GitHub Desktop.
A clipboard function for R using xclip on ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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