Hello all,
First message here. I'm a french student, and I'm working with Rstudio in an analytics class. We strated 2 weeks ago, but since then I can't make R work properly. My problem is so simple that it's almost stupid. When i try to import a CSV file that my teacher gave to the class, I get an error message.
Another possible problem is the decimal point representation (typically "," in France) which could interfere with the processing of a comma delimited file.
Can you open the file in a simple text editor to see how the data is stored?
The system won't let me save my file somewhere before "François", (C:) or Users are not available as saving spaces.
As for the comma problem, I don't know because in fact the csv file is simply an excel sheet, I don't have a problem opening it anywhere else.
The file is actually saved on my desktop. I tried to download it many times in different places on my PC, to see if it was really a path problem, I always get the same error message.
In countries (such as France), where the decimal point is represented by a comma, the separation character is usually a tab. So it is possible that your file is not a real csv file (comma separated values), but a tsv file (tab separated values). Which would explain the error message you are getting: your file might be called "whatever.csv", but it might not be a csv file. How did you create it?
If you open that file, you will be able to see that (and if you aren't sure, you can post a section of it here for us to double-check).
If this were the case, one way to import a tab separated file (.tsv) with base R is:
I don't think the problem comes from the file, all the other students in my class have the same as me and it works just fine. We've all downloaded the file in the same way (it has been posted by our teacher within the intranet of our school).
I tried to enter manual command @hughparsonage and I get what you can see on the picture (the file is not called europeancities anymore as we moved onto another exercice but the problem remains the same)
Alternatively, I tried with a friend's PC, no csv file problem here, but a package problem. When I want to open the file, a certain "R6" package is supposed to be installed, and it is not. When I try to install it, i get this :
is that your working directory and the directory holding your .csv file are different. Your working directory is your desktop (as you can see from your setwd() line and on the error message), while your file is in a different path (as you can see from the folder navigator window). That explains the error message you were getting. Setting the working directory to the location of your file or giving the full file path to the import function would solve this.
But this does not explain the other error messages that you got elsewhere.
Ya. Now that I am looking at this more carefully (sorry for my rushed message above), I think that this is the most likely. There is an error message about some locale issue and another one about an unexpected character... I think that R is not happy with your windows home path. Playing with the locale might fix this.
Are you using UTF-8? You might not be. And maybe you are the only one in your group having issues because you are the only one having a special character (le c cedille) in your name.
The problem you had when trying the USB path could be something else entirely.