.Rprofile (基于these 2个帖子。我必须删除.First<-function(){ }
。):
cat(rep("\n", 50))
if(file.exists("~/algae/analysisTxt.r")){
source("~/algae/analysisTxt.r")
cat("algae was loaded")
}
analysisTxt.r :
algae <- read.table('http://www.liaad.up.pt/~ltorgo/DataMiningWithR/DataSets/Analysis.txt',
header=F,
dec='.',
col.names=c('season','size','speed','mxPH','mnO2','Cl','NO3','NH4','oPO4','PO4','Chla','a1','a2','a3','a4','a5','a6','a7'),
na.strings=c('XXXXXXX'))
运行时,清除屏幕后,此错误会显示:
Error in eval.with.vis(expr, envir, enclos) :
could not find function "read.table"
我该怎么办?
答案 0 :(得分:3)
read.table
是utils
个套餐中的一项功能,那么在调用library(utils)
之前,.Rprofile
或analysisTxt.r
中的read.table
如何调用{{1}} ?