how to copy and paste my table in R to Excel?

I agree with @jrkrideau that you might do better writing your table to file. You could also use write.csv and then open the csv file in Excel, if reading/writing excel files is tricky (which it sometimes can be).

If you're really determined to copy and paste your data directly from R, though, one thing you could try would be the View() function in RStudio. Let's say you're working in RStudio and your table is called "tab". You could do View(tab), and the data viewer pane will open up, showing you a more Excel-like view of the data. I've generally had pretty good luck copying/pasting from the table viewer into excel, google sheets, etc.

2 Likes