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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:34:15+00:00 2026-05-13T20:34:15+00:00

The dataset I want to read in contains numbers with and without a comma

  • 0

The dataset I want to read in contains numbers with and without a comma as thousand separator:

"Sudan", "15,276,000", "14,098,000", "13,509,000"
"Chad", 209000, 196000, 190000

and I am looking for a way to read this data in.

Any hint 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-05-13T20:34:16+00:00Added an answer on May 13, 2026 at 8:34 pm

    since there is an “r” tag under the question, I assume this is an R question.
    In R, you do not need to do anything to handle the quoted commas:

    > read.csv('t.csv', header=F)
         V1          V2          V3          V4
    1 Sudan  15,276,000  14,098,000  13,509,000
    2  Chad      209000      196000      190000
    
    # if you want to convert them to numbers:
    > df <- read.csv('t.csv', header=F, stringsAsFactor=F)
    > df$V2 <- as.numeric(gsub(',', '', df$V2))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to process a file (1.9GB) that contains 100.000.000 datasets in R. Actually
I have a DataSet where I want to be able to have a Select
I have a dataset and I want to test to see how close it
I want to transform the dataset list, where the row is composed of different
I want to build a dataset consisting about 2000-3000 web pages, starting with several
I want to return the top 5 records of a table in a dataset
I want to be able to create the XSD file for my typed dataset
I have a dataset with one datatable. Now I want to set a filter
I have a dataset with some 30 records in it. I want to update
I'm creating a custom DataSet and I'm under some constrains: I want the user

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.