Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
i';我一直在为R包裹的传单而挣扎,我不断地发现这个错误_R - Fatal编程技术网

i';我一直在为R包裹的传单而挣扎,我不断地发现这个错误

i';我一直在为R包裹的传单而挣扎,我不断地发现这个错误,r,R,read.csv(tweetsfortnite,“C:\Users\Miriam\Documents\tweets.csv”,stringsAsFactors=FALSE) read.table中出错(文件=文件,标题=标题,sep=sep,quote=quote,: “file”必须是字符串或连接。read.csv()的第一个参数是file,应该是表示文件路径的字符串。我不在windows上,但我认为在windows上还需要将后向斜杠切换为前向斜杠,或者在文件路径中使用两个后向斜杠 试试这个:

read.csv(tweetsfortnite,“C:\Users\Miriam\Documents\tweets.csv”,stringsAsFactors=FALSE) read.table中出错(文件=文件,标题=标题,sep=sep,quote=quote,:
“file”必须是字符串或连接。

read.csv()的第一个参数是
file
,应该是表示文件路径的字符串。我不在windows上,但我认为在windows上还需要将后向斜杠切换为前向斜杠,或者在文件路径中使用两个后向斜杠

试试这个:

tweetsfortnite <- read.csv("C:\\Users\\Miriam\\Documents\\tweets.csv", stringsAsFactors = FALSE)
tweetsfortnite
tweetsfortnite <- read.csv("C:/Users/Miriam/Documents/tweets.csv", stringsAsFactors = FALSE)