Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9164185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:37:16+00:00 2026-06-17T14:37:16+00:00

I am looking for an easy way to get objects into MS Excel. (I

  • 0

I am looking for an easy way to get objects into MS Excel.
(I am using the preinstalled “Puromycin”-dataset for the examples)

I would like to place the contents of these objects to a single excel file:

Puromycin
summary(Puromycin$rate)
summary(Purymycin$conc)
table(Puromycin$state)
lm( conc ~  rate , data=Puromycin)

By “contents” i mean what is shown in the console when i press enter. I dont know what to call it.

I tried to do this:

sink("datafilewhichexcelhopefullyunderstands.csv")
Puromycin
summary(Puromycin$rate)
summary(Purymycin$conc)
table(Puromycin$state)
lm( conc ~  rate , data=Puromycin)
sink()

This gives med a file with the CSV-extension, however when i open the file in notepad,
there is comma-separation. That means that i cant get Excel to open it properly. By properly
i mean that each number is in its own cell.

Others have suggested this for a similar problem
https://stackoverflow.com/a/13007555/1831980

But as a novice i feel that the solution is too complex, and I am hoping for a simpler method.

What I am doing now is this:

write.table(Puromycin, file="clipboard" , sep=";" , row.names=FALSE ) 
write.table(summary(Purymycin$conc), file="clipboard" , sep=";" , row.names=FALSE )
... etc...

But this requires i lot of copy-ing and pasting, which I hope to eliminate.

Any help would appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:37:17+00:00Added an answer on June 17, 2026 at 2:37 pm

    write.table and its friends are intended to write out columns of data separated by whatever separator is specified. Your clipboard contains several data types because you are using summary which always gives a unique output.

    For writing the data values out, you can use write.csv on a data frame and then open with Excel. For example, Puromycin is already a data frame (which you can see with str(Puromycin)) so you can just write it out directly:

    write.csv(file = "some file.csv", x = Puromycin)
    

    Which will go into the current working directory (which can be determined with getwd()).

    To write out/save the results of the regression model is a bit more of a challenge. You could definitely use sink as you did, but specify an extension of .txt on your file so a text editor can open it. There are fancier methods (sweave, knitr) which you might want to look into in the long run, as they can write really nice reports automatically.

    In the meantime, get to know str(any R object) as it will be your friend. You can see all the objects in your workspace with ls().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for an easy way to get width and height dimensions for image
I am looking for an easy way to get files that are situated on
I am looking for an easy way to be able to get a value
I was looking for a quick easy way to format a int into a
Im looking for an easy way to move around a character and rotate it
I'm looking for an easy way in Obj.C to do add a space between
I'm looking for an easy way to generate previews for labels generated as pdfs.
I'm looking for an easy way to assign a post number to each post
I'm looking for an easy way to find the process tree (as shown by
I'm looking for an easy way of packing/unpacking data structures for sending over the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.