R语言 Error in file(file, "rt") : cannot open the connection
建立txt文档exam0203.txt后,运行程序:rt<-read.table("exam0203.txt",head=TRUE);rtlm.sol<-lm(Weigh...
建立txt文档exam0203.txt后,运行程序:
rt<-read.table("exam0203.txt",head=TRUE); rt
lm.sol<-lm(Weight~Height,data=rt)
summary(lm.sol)
然后就出现错误:
In addition: Warning message:
In file(file, "rt") :
cannot open file 'exam0203.txt': No such file or directory
> lm.sol<-lm(Weight~Height,data=rt)
Error in as.data.frame.default(data, optional = TRUE) :
cannot coerce class ""function"" to a data.frame
> summary(lm.sol)
Error in summary(lm.sol) : object 'lm.sol' not found
txt文件和exam0203.R文件建在桌面上
这是什么问题?刚刚接触R语言,求指点,怎么解决这个问题或者说怎么导致的问题? 展开
rt<-read.table("exam0203.txt",head=TRUE); rt
lm.sol<-lm(Weight~Height,data=rt)
summary(lm.sol)
然后就出现错误:
In addition: Warning message:
In file(file, "rt") :
cannot open file 'exam0203.txt': No such file or directory
> lm.sol<-lm(Weight~Height,data=rt)
Error in as.data.frame.default(data, optional = TRUE) :
cannot coerce class ""function"" to a data.frame
> summary(lm.sol)
Error in summary(lm.sol) : object 'lm.sol' not found
txt文件和exam0203.R文件建在桌面上
这是什么问题?刚刚接触R语言,求指点,怎么解决这个问题或者说怎么导致的问题? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询