Skip to content
Prev 11029 / 63424 Next

accessing windows clipboard from load and save (PR#4999)

On Sat, 8 Nov 2003 15:21:48 +0100 (CET), you wrote:

            
This is a documented limitation of the clipboard connection (which is
write-only), not a bug.  Yes, it would be nice if all clipboard
functions were supported, but they're not.
Is this documented somewhere?  I didn't know about it (but it does
work).

Personally, I'd rather have a connection created by a function named
clipboard(); it looks kludgy to interpret some filenames as magic
values.  Then your examples would be

save(x,ascii=TRUE,file=clipboard('w')) 

load(clipboard())

read.table(clipboard())

Another special connection (which might exist? I couldn't spot it)
would be one that read from a character vector, i.e. c('a','b','c')
would be read as 3 lines of one letter each.  Then something like

 stringConnection(readClipboard()) 

would be one way to implement clipboard().

Duncan Murdoch