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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:21:23+00:00 2026-05-30T02:21:23+00:00

Edit: So, this format would work: featureID charge xcoordinate ycoordinate 1 2 5105.9217 336.125209180674

  • 0

Edit:

So, this format would work:

featureID    charge    xcoordinate    ycoordinate
1            2         5105.9217      336.125209180674
1            2         5108.7642      336.124751115092
2            0         2434.9217      145.893331325278

But what if I have two columns with multiple value that are linked. Say column quality has a machine and a quality linked and the column looks like this

 MachineQuality
 [[{1:1224}, {2:3453}], [{1:2242}, {2:4142}]

Now if I want to split that up like I did with the coordinates of the convexhull I would need 2 rows instead of 1. But wouldn’t I need 2 rows for every row that is already in (so 4, because there are already 2 extra for the coordinates) like this:

featureID    charge    xcoordinate    ycoordinate         quality1    quality2
1            2         5105.9217      336.125209180674    1224        3453
1            2         5105.9217      336.125209180674    2242        4142
1            2         5108.7642      336.124751115092    1224        3453
1            2         5108.7642      336.124751115092    2242        4142
[...]

Would it have to be like this?


I’m very new to R, my knowledge doesn’t go much further than knowing how to make a vector and some simple plots. I’m going to use R for an internship project the next couple of months and during this time I will (hopefully) learn some of the ins and outs of R. However, before I start I need to produce the data that I’m going to do the statistics on. I need to know beforehand how I should format my output CSV data so that I can easily read it in once I start my R analysis.

One thing that I’ve been asked to do is make a CSV file out of the data so that it can be read in by R. The example CSV files for importing with R that I’ve seen all look like this

featureID    Charge    value
1            2         10
2            0         9

However, my data mostly consists out of columns for which the values contain multiple values. To clarify:
As an example, my data exists of “features” that, amongs other information has a “convexhull”. This convexhull consists of paired x and y coordinates. So what I could have for data is (only showing two coordinates, can be many)

featureID    Charge    Convexhull
1            2         [[{'y': '336.125209180674'}, {'x': '5105.9217'}], [{'y': '336.124751115092'}, {'x': '5108.7642'}]]

Is it possible to get this in one CSV file, being able to read it in R correctly (so that the paired x and y coordinates are preserved)? If so, how should the CSV file look like? For example, I’ve seen examples for CSV files with multiple values that look like this:

featureID    charge    xcoordinate    ycoordinate
1            2         5105.9217      336.125209180674
                       5108.7642      336.124751115092
2            0         2434.9217      145.893331325278

But I can’t find if this is easily imported by R.

If this is not doable in one CSV file, are the CSV files easily imported independently, with a primary key idea, like database linking?

  • 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-05-30T02:21:25+00:00Added an answer on May 30, 2026 at 2:21 am

    The only critical things are that you have a unique character separating your data columns and that each column is the same length. As long as the second row in your last example is filled in that will import fine.

    You need to consider what you want to do with the data after it’s in R to decide how you might want any other special formatting beforehand. But, as long as the column separator is a unique character and the columns are of equal length then it will import.

    (You can violate the unique separator requirement if your entries are wrapped in quotes. And if you want to get really fancy you could “import” almost anything. But if someone’s asking you to format the data then they probably want a rectangular data.frame compatible layout. They probably want unique values in each column (no columns of points). But that’s between you and them.)

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

Sidebar

Related Questions

How would like a class that will return a json format. This method work
Looking for a little helping understanding how this route would work? New route: resources
I have a file csv file in this format, I would like to generate
The values will be in this format 123-123-123-12345 that I would like the preg_match
Edit: This problem was down to me passing the wrong view to the Touch
edit This question is solved! Having something weird. I'm using html { font-size: 100%
Edit: this question is outdated. The jsonlite package flattens automatically. I am dealing with
EDIT: This post was originally specific to ASP.NET, but after thinking about it I'm
Edit This question has gone through a few iterations by now, so feel free
EDIT: This question is a duplicate of What is the difference between managed and

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.