I tested this on Windows (Excel) and Ubuntu (Gnumeric) and it is a nice little feature which can save a lot of time. If you copy a data table in a spreadsheet into the clipboard you can read the data into R with
> x <- read.delim("clipboard", na.str=".", header=T)
Do not try it with really big tables... ;)
on mac there is something similar, I made a note when we tried it on a mac during a course but i do not remember exactly and can not test it because i do not own a macbook...
> read.table(pipe("pbpaste"))
my personal notepad - for all the things I used to write on pieces of paper ( which where never seen again esp. when I needed them ) ...
Friday, June 3, 2011
Subscribe to:
Post Comments
(
Atom
)
You can try with my mac book ;-)
ReplyDeleteGuess who!
Nice. Other post's suggested writing to the clipboard on linux is problematic*. Thanks to your post i see that at least reading from it is...too easy. Thanks for sharing!
ReplyDelete* http://stackoverflow.com/questions/10959521/how-to-write-to-clipboard-on-ubuntu-linux-in-r