Not able to read the csv files and every time it shows an fatal error

I think we need a bit more information. First hero are some suggestions on how to provide a reproducible example (reprex)

Screenshots are not ideal. However it looks like you have some version conflict. What version of R and RStudio are you using? At a guess install.load has installed packages that are newer than your version of R.

Can you supply the output of


R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server x64 (build 14393)

Matrix products: default

[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_4.1.2 tools_4.1.2

Humm, I guess I was wrong about the R versions issue. What is your RStudio version?

Could you supply your code in a formatted block. See FAQ: How to format your code for an easy way to do this.

What happens if you try running this script in the Windows GUI?

What does the raw .csv file look like? Is it large?

I think it is likely that you are simply running out of RAM memory

I was using the latest version of R studio 4.1.2

Nope, the machine has 128 GB RAM..

That's the R Version. Check under Help -> About Rstudio for the RStudio version. I am running V 1.4.1717 which is either up-to-date or close to it.

It still is possible. What happens if you make a copy of the data file and drastically reduce its size? Perhaps by 50%.

The latest RStudio version is 2021.09.1+372 (new versioning convention).

But, but ..., I just updated! Oh well once again into the breach.

I was using the latest version of R studio only

Just to simplify - when I tried to read the CSV file it shows the above-mentioned error.

Have you tried reading in a smaller sample of the file? Or perhaps try


Can you give us a small sample of the data?

Yes, i have tried Read_csv also and it shows that there are no rows in the file.

Yes, I have tried with the smaller files also and still facing the same issues

We really need your code in a usable form and some idea of what the file FMCG_CAT_2019.csv is.

Sure i can share the code but apologies given the company code of conduct I can really share the file

I was afraid of that. Any chance of some kind of mock-up of the .csv file? The actual contents can be random as long as they match the data types. Either the FMCG_CAT_2019.csv or MTfeasibilitycheck.csv. Now ttat I think of it MTfeasibilitycheck.csv is probably the more useful

In any case the actual code would be welcome.

Just to clarify again am not able to read any small file in the machine so there is no chance of mismatches of data types

Okay, I misread that. I thought you meant a subset of MTfeasibilitycheck.csv but you cannot read any .csv file? This may mean that your best bet is reinstalling R. Just for interest can you read some other format such as Excel?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.