I want to create an excel-R :: data.table interface. I would like to ask how you can use the fread function with the clipboard. The following code works well, but I would prefer to use fread instead of read.table (to play a copy of some table in the excel file and execute the command above in R):
data.table(read.table("clipboard",sep="\t",header=TRUE))
I tried to declare a connection to the clipboard, but so far I can not get it to work. Also, as stated in the fread function documentation, this will change, and some things may be deprecated, so it would be nice to have a solution that won't expire in the near future. Are there any restrictions for the clipboard / fread? e.g. 65,000 lines or some other memory limit?
I would also suggest extending the data.table :: fread function to accept the default clipboard, since it currently works with read.table.
thanks
source
share