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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:15:01+00:00 2026-05-23T01:15:01+00:00

I have a simple csv file with around 20K+ values separated by commas. When

  • 0

I have a simple csv file with around 20K+ values separated by commas. When I try to load the values in R, it gives me the error:

r:3: unexpected numeric constant

Here is the simple command of R that I executed

someThing <- c(0.080172405,0.06233087,0.04315185,0.0652015,0.03201301.......n)
n= 70,000 values

I cannot copy paste all the 20K+ values here. I googled this error and there is no special character or another thing except for some floating values.

EDIT

http://pastebin.com/FVkUV6kY

  • 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-23T01:15:01+00:00Added an answer on May 23, 2026 at 1:15 am

    There’s a newline partway through the file, which is causing that section to look something like (replacing that newline with a space) and so after the space, there’s an unexpected numeric constant.

    ... 0.0068243323,0.0733 7422182,0.07379706 ...
    

    Here’s how I found it:

    b <- scan(file, what=character(0))
    length(b)
    

    The length is 2, not 1.

    It can be read in as is like this:

    b <- paste(b, collapse="")
    b <- substring(b, 3, nchar(b)-1)
    b <- strsplit(b,",")[[1]]
    b2 <- as.numeric(b)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple report that I want to export to a CSV file.
I have another csv file where I am trying to do a simple word
I have a simple python script for indexing a CSV file containing 1 million
I have a simple scripts to upload csv file and it works . But
I have a simple .csv file that has that I want to extract data
I have an Excel/CSV file with relatively simple format. 1|2|3|4|10|20|30 | | | |40|50|60
I want to have an ASP C# WebSite that loads a simple CSV File
I have a simple JSP to download a csv file containing Japanese characters. Downloaded
I have a simple 3 column csv file that i need to use python
I have a simple 3 column csv file and i need to exctract only

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.