我是一个新手,第一次使用 R,如果我的问题太基础请见谅。 我在 Windows 7 上安装了最新版本的 R,并尝试使用
.txt
文件进行练习;
students<-read.table("students.txt",header=T,sep="\t")
但是总是会出现以下错误信息:
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'students.txt': No such file or directory
我已经切换到存放students.txt的目录,但它仍然不能工作。请帮忙!非常感谢您提前的帮助。
file.choose()
。因此,您的代码应如下所示:students <- read.table(file.choose(), header=T, sep="\t") - hgcrpd