.Rprofile (Based on these 2 posts. I had to remove.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'))
When run, after clearing the screen, this error shows up:
Error in eval.with.vis(expr, envir, enclos) :
could not find function "read.table"
What should I do?
read.tableis a function inutilspackage, so how about calllibrary(utils)in.Rprofileor inanalysisTxt.rbefore the call ofread.table?