R Tip: Writing To The Clipboard
Created
Markus Gesmann - Markus.Gesmann at Lloyds dot com
2006-04-09
Tip
By writing a variable to the clipboard, you can paste it's value into other application (e.g. Excel). The following code achieves this:
write.clipboard <- function (tab, ...) write.table(tab, "clipboard", sep="\t", row.names = F)
By using this function in the Start-up settings, this function will be available whenever you use R. One example for using this function is:
x <- rnorm(10)
write.clipboard(x)
Comments (0)
You don't have permission to comment on this page.