找回密码
 注册
查看: 272|回复: 0

R语言 sperich包 edgeNotValid()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 14:59:40 | 显示全部楼层 |阅读模式
edgeNotValid(sperich)
edgeNotValid()所属R语言包:sperich

                                        Edge-Water-Test
                                         边缘试水

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This function checks if an edge would cross a water or mountain surface.
此功能检查,如果边缘交叉的水或依山面。


用法----------Usage----------


edgeNotValid(grid,point.a, point.b, landwatermask, upperbound)



参数----------Arguments----------

参数:grid
A grid to which the edge should be added if it hits no water or mountain surfaces.
一个网格,应补充的边缘,如果它击中没有水或山面。


参数:point.a
A point in a grid given by its row and column.
A点在网格中的行和列。


参数:point.b
A point in a grid given by its row and column.
A点在网格中的行和列。


参数:landwatermask
A grid containing the land-water-information of the observed area.  If a grid cell containes no land, the value of the cell in the  landwatermask is -1, otherwise it is 0. Additional, height-informations could  be added for land surfaces. In this case, take care of the 'upperbound' value.
的网格中所观察到的区域的土地与水的信息。一个的网格单元containes没有土地如果的landwatermask的单元格中的值是-1,否则为0。另外,土地表面高度的信息可以被添加。在这种情况下,照顾的“上界”的价值。


参数:upperbound
This value determines the height (based on values in 'landwatermask')  which is considered to be a barrier for species distribution.
此值确定的高度(基于价值观在“landwatermask”),这被认为是物种分布的障碍。


Details

详细信息----------Details----------

This function checks if an edge would cross a water or mountain surface.
此功能检查,如果边缘交叉的水或依山面。


值----------Value----------

A boolean value which determines if the edge would cross a water or mountain surface.
一个布尔值,确定边缘交叉的水或依山面。


(作者)----------Author(s)----------


Maximilian Lange, Sven Lautenbach



实例----------Examples----------


##load data[#加载数据]
data(dataset.all.species)
data(dataset.landwater)

##initialize variables[#初始化变量]
distance <- 5

##create grid parameters[#创建网格参数。]
dimension <- getDimension(dataset.all.species)
shift <- getShift(dataset.all.species)

##create landwatermask[#创建landwatermask]
landwatermask.nocoast <- createLandwatermask(dataset.landwater, dimension, shift)

##extract datasets of one species out of database[#一个物种的数据库中提取的数据集]
dataset.one.species <- extract.species(dataset.all.species, 3)

##create grid[#创建一个网格]
grid <- matrix(0,dimension[1],dimension[2])

##add points[#加分]
grid <- add.Data.to.Grid(dataset.one.species, dimension, shift)

##points to list[#指向列表]
points <- which(grid > 0)
points.xy <- list()
for (i in 1:length(points)){
                points.xy[[i]] <- c(ifelse((points[i] %% dimension[1]) == 0, dimension[1],
                                        points[i] %% dimension[1]),
                                        ceiling(points[i]/dimension[1]))
        }


##Edge-Water-Test[#边缘试水]
check <- edgeNotValid(grid, points.xy[[1]],points.xy[[2]],
                                landwatermask.nocoast, 1000)
print(check)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-18 20:22 , Processed in 0.033717 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表