Unable to import CSVs using READR 1.3.1?


#1

Hi all

First post here, and excited to finally be using R enough that I’m having problems :slight_smile:

I was using readr 1.2.1 on my Mac and PC until this morning. I’m using readr to import a CSV (read_csv) of a dummy data set so I can write the code for the project before we actually star data collection. Everything was working fine, but then I upgraded to 1.3.1 on both machines and now getting some weird behaviour. If I use the Import Dataset - Text(readr) menu, I get this error:

If I use df<- read_csv(“c:/file.csv”), only my column names import (even though I’ve got 33 rows of data).

I’ve tried other import methods (they work, but the column names are different from what I’ve written into my code), so I think it’s something to do with readr?

Any ideas? I’m supposed to be submitting the dummy analyses tomorrow and really don’t want to rewrite all my code (>300 lines).

Thanks
Chris


#2

Can you reveal the first couple of lines of your csv file? Do you have any single quotes / double quotes stuff going on?

A small buglet just got fixed and the symptoms sound very similar:


#3

Hi @jennybryan - I did a "Search and Replace", removing all single apostrophes in my CSV and putting in underscores and the import now works. Thank you so much; this is much easier for me to work around than re-writing all my code!
Do you know when this will be fixed?
Thanks again and have a great weekend.


#4

Re: when it will be resolved, you should subscribe the GitHub issue I linked to. That will keep you informed.


#5

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