At first I thought importing data from the clipboard was only working in Windows using the well known
readClipboard()
or
df <- read.table(file='clipboard', sep='\t')
But couldn’t find a way that would work, so I used to do it the dummy way (i.e. save each .xls as .csv)
Turns out it could be done using pipe files, knowing that “pbpaste” corresponds to Mac’s clipboard pipe file:
df <- read.table(pipe('pbpaste'), sep='\t', header=T)
And that’s it!