戴小华. 2009.基于R语言的中国柑橘主要病虫害空间分布图. 江西农业科学, 21(4): 76-78. 摘要:本文运用 R 语言的 GIS 功能包生成了中国柑橘主要病虫害的空间分布图,结果发现:中国柑橘主要病虫害呈现出各种不同的空间分布规律,其形成的原因除了病虫害本身的生物学特性外,多多少少与气候因子的空间规律有关; R 语言生成的病虫害空间分布图直观明显,作图质量和商业化 GIS 软件相比,并不逊色。如能结合 R 语言中强大的统计优势,并和开源 GIS 软件 GRASS 相配合, R 可以广泛地应用于各种病虫害的时空分析,为病虫害的综合防治提供支持。 关键词: R ,柑橘,病虫害,空间分布,地理信息系统 Dai X. 2009. R-based Spatial Distribution Maps of Citrus Diseases and Pests in China. Jiangxi Agricultural Science. In press. Abstracts: Spatial distribution maps of citrus diseases and pests in China were made with GIS packages in R language. The results indicated that: different diseases and pests showed different spatial distribution patterns, not only due to their biological characteristics but also to the spatial laws of climate factors; R-based GIS maps are visually distinct, which quality was comparable to commercial GIS softwares. If combining Rs powerful statistical advantages and interconnecting with open-source GIS softwareGRASS, R can be widely used in the spatio-temporal analysis of diseases and pests, and provide support for their integrated management. Key words: R, Citrus, Diseases and pests, Spatial distribution, GIS 全文 Fulltext 基于R语言的中国柑橘主要病虫害空间分布图 可能由于出版印刷原因,pdf上的图严重失真,下面是原始图片 (original figures)。 R源代码如下(以蚧类为例)R Code (Scale as an example): require(maptools)#装载地图工具功能包 Load maptools read.shape(pests) - pestmap #读入中国柑橘病虫害的shp文件 Read the shp file of Chinese citrus pests and diseases attributes(pestmap$att.data) #查看该shp文件的属性表 View the atrribute tables of the above shp file. # 蚧类发生率分成三组并用不同颜色显示 The damage rates of scale insect are divided into 3 groups and showed with different colours br1 - c(0.015,0.035,0.055,0.074) rm - cut(pestmap$att.data$蚧类,breaks=br1,labels=c(1:3)) cols - c(gray,blue,red) fgs - cols # 生产柑橘蚧类为害率的空间分布图 Plot the distribution map of scale damage rate plot.Map(pestmap,fg=fgs,ol=black,main=柑橘蚧类为害率, xlab=经度, ylab=纬度) # 图注 Legends legtext - c(0.016-0.035,0.035-0.055,0.055-0.074) legend(topright,bg=white, fill=cols,legend=legtext) # 标志各省市区名称 Label the names of provinces, cities and regions dat = read.csv(con - textConnection(lb,jd,wd 重 庆 市,106.3,29.6 浙 江 省,119.2,29 湖 南 省,111.3,28.1 江 西 省,115.9,28.2 湖 北 省,112,31 四 川 省,103,30.65 贵 州 省,106.5,27.1 福 建 省,117.8,26.5 广 东 省,113.2,23.5 广西壮族自治区,108.7,24.3 云 南 省,101.2,24.8 陕 西 省,108.3,34.1)) text(dat$jd,dat$wd,dat$lb,col=white) close(con)