jz.mraz 发表于 2015-2-25 21:26 
好的。 谢谢啦!
又报错。

[sweat]
> install.packages('fields', depend=TRUE)
Installing package into ‘C:/Users/doc12104/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Warning: unable to access index for repository http://cran.ism.ac.jp/bin/windows/contrib/3.0
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.0
Warning messages:
1: In open.connection(con, "r") :
InternetOpenUrl failed: 'The server name or address could not be resolved'
2: package ‘fields’ is not available (for R version 3.0.1)
> library(mapdata)
Loading required package: maps
Warning messages:
1: package ‘mapdata’ was built under R version 3.1.2
2: package ‘maps’ was built under R version 3.1.2
> library(fields)
Error in library(fields) : there is no package called ‘fields’
>
> dat <- read.csv('e:/tmp/distributation.csv', header=TRUE, stringsAsFactors)
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
object 'stringsAsFactors' not found
> dat$Name <- tolower(dat$Name)
Error in tolower(dat$Name) : object 'dat' not found