[R-SIG-Mac] paste data into R
Simon Urbanek
simon.urbanek at r-project.org
Mon Jan 9 23:57:53 CET 2006
Sylvain,
On Jan 9, 2006, at 5:46 PM, Sylvain Charlat wrote:
> Does anybody know how to copy / paste data from Excel to R?
>
> If I type the following:
>
>> read.table(file("clipboard"))
>
> or
>
>> read.delim(file("clipboard"))
>
> I get an error message:
>
>> Error in open.connection(file, "r") : X11 module cannot be loaded
>
Wrong connection, you should use pipe("pbpaste") - see ?pipe - so in
your example it could look like this:
read.table(pipe("pbpaste"),sep="\t")
Cheers,
Simon
More information about the R-SIG-Mac
mailing list