readClipboard removed from utils package?

2019-04-02 02:19发布

问题:

I'm using R 3.1.0 and can't seem to find the readClipboard function that should be in the utils package. Is there a way to enable the use that function from an older package?

Thanks.

回答1:

read.DIF("clipboard") will do the same job. try that. I think it is possible however to integrate old utils packages. You can download and install them from here



回答2:

I think you may be after:

readLines("clipboard")

However, for an OS independent approach see this GitHub package, overflow's, readClip function.



回答3:

You can also read from the clipboard with read.table and read.csv

read.table("clipboard", ...)
## or
read.csv("clipboard", ...)

This link has proven useful for me over time.