#my.data <- read.clipboad()
#my.data <- read.clipboard.csv()
## The function is currently defined as
function(header=TRUE,...) {
MAC<-Sys.info()[1]=="Darwin" #are we on a Mac using the Darwin system?
if (!MAC ) {if (header) read.clipboard<-read.table(file("clipboard"),header=TRUE,...)
else read.clipboard<-read.table(file("clipboard"),...) }
else {
if (header) read.clipboard<- read.table(pipe("pbpaste"),header=TRUE,...)
else read.clipboard<- read.table(pipe("pbpaste"),...)}
}
Run the code above in your browser using DataLab