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

  • Home
  • SEARCH
  • 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 8852659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:27:25+00:00 2026-06-14T13:27:25+00:00

This should be very simple, but my efforts with unlist or matrix failed. How

  • 0

This should be very simple, but my efforts with unlist or matrix failed.

How can you export the following list into an excel sheet that preserves the same structure?

list(structure(list(rob = c(0.500395231401348, 0.839314035292317, 
0.710466394967634, 0.61574235723249)), .Names = "rob", row.names = c(NA, 
4L), class = "data.frame"), structure(list(rob = c(0.66163340478379, 
0.591092739290417, 0.554484883310407, 0.78199375944331, 0.489388775242085
)), .Names = "rob", row.names = c(NA, 5L), class = "data.frame"), 
    structure(list(rob = c(0.697897964659196, 0.480394119894312, 
    0.514294379103359, 0.626971885076273, 0.77938643423231, 0.618135503224601
    )), .Names = "rob", row.names = c(NA, 6L), class = "data.frame"))

Thanks!

  • 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-14T13:27:26+00:00Added an answer on June 14, 2026 at 1:27 pm

    You can do it by:

    1. Padding each vector with NA to make all vectors the same length
    2. Using do.call(rbind, ...) to create a data frame

    Like this:

    xx <- lapply(x, unlist)
    max <- max(sapply(xx, length))
    do.call(rbind, lapply(xx, function(z)c(z, rep(NA, max-length(z)))))
    
              rob1      rob2      rob3      rob4                    
    [1,] 0.5003952 0.8393140 0.7104664 0.6157424        NA        NA
    [2,] 0.6616334 0.5910927 0.5544849 0.7819938 0.4893888        NA
    [3,] 0.6978980 0.4803941 0.5142944 0.6269719 0.7793864 0.6181355
    

    Then it’s a simple mattter of using write.table() or your favourite export to excel method.

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

Sidebar

Related Questions

This seems like it should be very simple but I can't get it to
This should be very simple but I failed to google it: How (if at
This should be very simple, but I'm blocking on this.... Let's say, for the
I feel as if this should be very simple, but it's behaving strangely. I
This should be simple, but I am still lost. There is a very similar
This should be simple but I cannot figure it out. I have this very
This should be very simple, but I cannot find the correct syntax using search.
This should be simple, very simple, but I'm having a hard time with it.
This should be very simple, but its very frustrating. I have a LinqToSql as
It should be very simple but I can't figure it out. I have a

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.