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.
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.
Here’s how I found it:
The length is 2, not 1.
It can be read in as is like this: