I am trying to use the write.table function to write to my clipboard on a mac os system. From other threads, I've tried
data <- rbind(c(1,1,2,3), c(1,1, 3, 4), c(1,4,6,7))
clip <- pipe("pbcopy", "w")
write.table(data, file="clip")
close(clip)
This code does not give any error messages, but also does not copy anything to the clipboard. any suggestions?