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 7757709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:09:53+00:00 2026-06-01T13:09:53+00:00

This is one column of a data frame. I want to further split into

  • 0

This is one column of a data frame. I want to further split into for 4 columns. The problem is the spaces between each columns which is indifferent depending upon the numbers.

 -92 -100    0   29   
  ··   ··    0   29  
   0    0    0    0  
  --   --   --   --
 -93   21   ··   ··

1st Row
// There is 1 space between -92 and -100 and 4 spaces between 100 and 0 and 3 space between 0 and 29.

2nd Row
There is 3 space between 1st col and 2nd col, 3 space between 2nd and 3rd column and 3 space between 3rd and 4th column

3rd Row
4 space between each column

4th Row
3 space between each column.

  • 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-01T13:09:54+00:00Added an answer on June 1, 2026 at 1:09 pm

    I think the answer (after editing the question to change the data layout to mono-spaced typeface) to the question is read.fwfwhich is in the ‘utils’ package so it should be available without needing to load anything.

    read.fwf(file=textConnection(" -92 -100    0   29   
       ··   ··    0   29  
        0    0    0    0  
       --   --   --   --
      -93   21   ··   ··"), header=FALSE, widths=c(4,5,4,4))
    #------------------
        V1    V2   V3   V4
    1  -92  -100      0   
    2   ··    ··      0   
    3    0     0      0   
    4   --    --    - -   
    5  -93    21    · ·   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data frame with several columns, one of which is a factor
I have a data.frame which has multiple columns. One of the columns is time
This is an extension of this question: SQLite problem selecting two columns as one
R: how can I populate the rows of a data frame, in which each
I have a data frame the first columns of which are a sample ID
I've got a data frame like this one 1 1 1 K 1 K
I have two data.frames in R, one of which has two columns and of
My requirement A table needs to maintain a status column. This column represents one
How does one do this? The SYSCOLUMNS system table only has columns for tables.
Settings table contains always one row with lot of long-caption columns. Opening this in

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.