代码不起作用

时间:2015-11-21 01:54:39

标签: r

我是R的新手,用它来分类遥感图像。我的代码已经由我的教授编写,但我无法让它工作。发生这种情况:

 source("CompareMethods.R")
Error in file(filename, "r", encoding = encoding) : 
  cannot open the connection
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file 'CompareMethods.R': No such file or directory

1 个答案:

答案 0 :(得分:0)

答案由R告知:

  

没有这样的文件或目录

使用R,您始终在目录或文件夹中工作。从setwd('path/to/the/folder/with/your/file/in/it')开始,您可以设置工作目录。

相关问题