|
easyham.path<- file.path("F:/Program Files/R/R-2.15.0","easy_ham/")
get.msg=function(path){
con=file(path,open='rt',encoding='latin1')
text=readLines(con)
msg=text[seq(which(text=='')[1]+1,length(text),1)]
close(con)
return(paste(msg,collapse='\n'))
}
get.msg(easyham.path)
错误于file(path, open = "rt", encoding = "latin1") : 无法打开链结
此外: 警告信息:
In file(path, open = "rt", encoding = "latin1") :
无法打开文件'F:/Program Files/R/R-2.15.0/easy_ham': Permission denied
为什么调用函数之后无办法打开路径的链接,其中con=file(easyham.path,open='rt',encoding='latin1')
text=readLines(con) 分别用这两行代码去运行也是显示无法打开文件,求大神解答!!
|
|