read.asc(SDMTools)
read.asc()所属R语言包:SDMTools
ESRI ASCII Raster File Import And Export
ESRI ASCII栅格文件导入和导出
译者:生物统计家园网 机器人LoveR
描述----------Description----------
read.asc and read.asc.gz reads ESRI ArcInfo ASCII raster file either uncompressed or compressed using gzip. <br> <br> write.asc and write.asc.gz writes an asc object to a ESRI ArcInfo ASCII raster file. The output can be either compressed or uncompressed. <br> <br> These functions are faster methods based on the adehabitat import.asc and export.asc.<br><br> image.asc and print.asc are generic methods associated with plotting & summarizing data of class 'asc'; they were modified from adehabitat package.
read.asc和read.asc.gzESRI读取,ArcInfo的ASCII光栅文件使用gzip压缩或压缩的。参考参考write.asc和write.asc.gz写了一个递增到ESRI ArcInfo的ASCII光栅文件对象。输出可以是压缩或解压缩。参考这些功能是更快的方法的基础上在adehabitat import.asc和export.asc。<BR> <BR> image.asc和print.asc是通用的方法与绘图和总结相关的数据类ASC,他们被修改adehabitat包。
用法----------Usage----------
read.asc(file,gz=FALSE)
read.asc.gz(file)
write.asc(x,file,gz=FALSE)
write.asc.gz(x,file)
## S3 method for class 'asc'
print(x, ...)
## S3 method for class 'asc'
image(x, col = gray((240:1)/256), clfac = NULL, ...)
参数----------Arguments----------
参数:file
a character string representing the filename of the input/output file. The file extension should always be '.asc'.
一个字符表示的输入/输出文件的文件名的字符串。文件的扩展名应该总是ASC。
参数:gz
defines if the object is or should be compressed using gzip
定义,如果对象是或应使用gzip压缩
参数:x
an object of class 'asc' as defined in the adehabitat package
类“递增”的一个目的,定义在adehabitat包
参数:col
for maps of type "numeric", the colors to be used (see help(par))
图类型"numeric",使用的颜色(见help(par))
参数:clfac
for maps of type "factor", a character vector giving the names of colors for each level of the factor (see help(colasc))
图类型"factor",颜色的名称字符向量给每个级别的因素(见help(colasc))
参数:...
additional arguments to be passed to the generic function image or print
额外的参数传递的通用功能image或print
Details
详细信息----------Details----------
Implements a faster version of import.asc or export.asc from the adehabitat package. In addition, files can be read in and written to in gzip compressed format.<br><br> Generic methods of print and image were modified from adehabitat. Further details of them are found there.
实现更快的版本的import.asc或export.asc从adehabitat包。此外,文件可以被读取和写入gzip压缩的格式。,从adehabitat <BR> <BR>泛型方法进行了修改,打印和图像。进一步详情。
值----------Value----------
Returns a raster matrix of the class 'asc' defined in the adehabitat package with the following attributes:
返回类的递增定义在adehabitat包具有以下属性的栅格矩阵:
参数:xll
the x coordinate of the center of the lower left pixel of the map
左下像素的图的中心的x坐标
参数:yll
the y coordinate of the center of the lower left pixel of the map
左下像素的图的中心的y坐标
参数:cellsize
the size of a pixel on the studied map
研究的图上的像素的大小
参数:type
either 'numeric' or 'factor'
无论是“数字”或“因素”
参数:levels
if type = 'factor', the levels of the factor.
如果type =因素,因素的水平。
(作者)----------Author(s)----------
Jeremy VanDerWal <a href="mailto:jjvanderwal@gmail.com">jjvanderwal@gmail.com</a>
实例----------Examples----------
#create a simple object of class 'asc'[创建一个简单的对象类的ASC“]
tasc = as.asc(matrix(rep(x=1:10, times=1000),nr=100)); print(tasc)
#write out the raster grid file[写出来的光栅的网格文件]
write.asc(tasc,'t.raster.asc')
write.asc.gz(tasc,'t.raster.asc') #actually save file name as t.raster.asc.gz[实际保存的文件名t.raster.asc.gz]
#read in the raster grid files[在光栅格档读取]
tasc2 = read.asc('t.raster.asc')
tasc3 = read.asc.gz('t.raster.asc.gz')
#remove the temporary raster[删除临时光栅]
unlink(c('t.raster.asc','t.raster.asc.gz'))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|