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

Duncan Murdoch dmurdoch at pair.com
Sat Nov 8 16:40:54 MET 2003

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

>Full_Name: Gabor Grothendieck
>Version: 1.7.1
>OS: Windows 2000
>Submission from: (NULL) (
>   save(x,ascii=TRUE,file("clipboard")) 
>works but 
>   load(file("clipboard")) 
>does not.

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.  

>Even better would be if
>   save(x,ascii=TRUE,"clipboard") 
>   load("clipboard")
>worked as that would provide consistency with read.table("clipboard")

Is this documented somewhere?  I didn't know about it (but it does

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




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


would be one way to implement clipboard().

Duncan Murdoch

More information about the R-devel mailing list