“Non reconnus s'échapper dans la chaîne de caractères” tout en essayant de lire un fichier CSV

Je suis en train d'importer un .csv fichier, afin que je puisse suivre avec cette vidéo: R ggplot2 Graphiques en Histogrammes.

J'ai installé tous les paquets dont ggplot et les paquets. La première instruction dans la vidéo dit de type afl.df=read.csv("afl_2003_2007.csv")

Donc, j'ai téléchargé afl_2003_2007.csv fichier, et j'ai essayé tous les ci-dessous, qui a été essentiellement placer les fichiers dans des répertoires différents (lecteur partagé, puis disque C, etc.). J'ai aussi essayé d'utiliser setwd, mais pas de chance.

Je suis à l'aide de R dans windows.

Voici ce que j'ai essayé, et les erreurs que j'ai obtenu:

> afl.df=read.csv("afl_2003_2007.csv")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
  cannot open file 'afl_2003_2007.csv': No such file or directory
> afl.df=read.csv("\\the-lab.llnl.gov\llnlusers1\lopez235\Data\Documents\Dashboards,HRBI, Visulizations and Analytics\Math and Statistics and Predictive Modeling1\R Programming\afl_2003_2007.csv")
Error: '\l' is an unrecognized escape in character string starting "\\the-lab.llnl.gov\l"
> afl.df=read.csv("C:\Users\lopez235\Local-NOTBackedUp\R Files Local\afl_2003_2007.csv")
Error: '\U' used without hex digits in character string starting "C:\U"
> setwd("\\the-lab.llnl.gov\llnlusers1\lopez235\Data\Documents\Dashboards,HRBI, Visulizations and Analytics\Math and Statistics and Predictive Modeling1\R Programming\afl_2003_2007.csv")
Error: '\l' is an unrecognized escape in character string starting "\\the-lab.llnl.gov\l"
> setwd("\\the-lab.llnl.gov\llnlusers1\lopez235\Data\Documents\Dashboards,HRBI, Visulizations and Analytics\Math and Statistics and Predictive Modeling1\R Programming")
Error: '\l' is an unrecognized escape in character string starting "\\the-lab.llnl.gov\l"
> setwd("C:\Users\lopez235\Local-NOTBackedUp\R Files Local")
Error: '\U' used without hex digits in character string starting "C:\U"
Utiliser des barres obliques ou double e.g.e \ \ \ \ \ au lieu de \\, \\ au lieu de \. \ dans des chaînes est un caractère d'échappement.

OriginalL'auteur daniellopez46 | 2012-05-02