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

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

  [复制链接]
发表于 2012-9-30 15:29:37 | 显示全部楼层 |阅读模式
kernel2d(splancs)
kernel2d()所属R语言包:splancs

                                         Kernel smoothing of a point pattern
                                         核平滑的点模式

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

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

Perform kernel smoothing of a point pattern
执行核平滑的点模式


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


kernel2d(pts,poly,h0,nx=20,ny=20,kernel='quartic',quiet=FALSE)
spkernel2d(pts, poly, h0, grd, kernel = "quartic")



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

参数:pts
A points data set, or in function spkernel2d an object with a coordinates method from the sp package  
A点的数据集,还是在功能spkernel2d对象,SP包从一个坐标法


参数:poly
A splancs polygon data set  
一个splancs多边形数据集


参数:h0
The kernel width parameter  
核宽度参数


参数:nx
Number of points along the x-axis of the returned grid.  
沿x轴的返回的网格点的数量。


参数:ny
Number of points along the y-axis of the returned grid.  
沿y-轴的返回的网格点的数量。


参数:kernel
Type of kernel function to use. Currently only the quartic kernel is implemented.  
类型的内核函数来使用。目前只有四次内核中实现。


参数:quiet
If TRUE, no debugging output is printed.  
如果是TRUE,没有调试输出打印。


参数:grd
a GridTopology object from the sp package
一个GridTopology对象的SP包


Details

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

The kernel estimate, with a correction for edge effects, is computed for a grid of points that span the input polygon. The kernel function for points in the grid that are outside the polygon are returned as NA's. The output list is in a format that can be read into image() directly, for display and superposition onto other plots.
核估计,与边缘效应的校正,被计算为一个网格点跨越输入多边形。在网格中的以外的多边形的点的核函数返回为NA的。输出列表的格式,可以读入image()直接到其他图,用于显示和叠加。


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

kernel2d returns a list with the following components:
kernel2d返回一个列表,以下组件:


参数:x
List of x-coordinates at which the kernel function has been evaluated.
内核函数已被评估的x坐标的列表。


参数:y
List of y-coordinates at which the kernel function has been evaluated.
y坐标在哪些内核函数已被评估的名单。


参数:z
A matrix of dimension nx by ny containing the value of the kernel function.
维的矩阵nxny包含的内核函数的值。


参数:h0, kernel
containing the values input to kernel2d
包含的值输入到kernel2d

spkernel2d returns a numeric vector with the value of the kernel function stored in the order required by sp package SpatialGridDataFrame objects
spkernel2d返回一个数值向量的核函数的值存储在由sp的软件包SpatialGridDataFrame对象所需的顺序


参考文献----------References----------

Second-Order Intensity of Spatial Point Patterns.  J. R. Statist Soc B51 81-92; Rowlingson, B. and Diggle, P. 1993 Splancs: spatial point pattern analysis code in S-Plus.  Computers and Geosciences, 19, 627-655, (Barry Rowlingson ); the original sources can be accessed at: http://www.maths.lancs.ac.uk/~rowlings/Splancs/. See also Bivand, R. and Gebhardt, A. 2000 Implementing functions for spatial statistical analysis using the R language. Journal of Geographical Systems, 2, 307-317.

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


data(bodmin)
plot(bodmin$poly, asp=1, type="n")
image(kernel2d(as.points(bodmin), bodmin$poly, h0=2, nx=100, ny=100),
add=TRUE, col=terrain.colors(20))
pointmap(as.points(bodmin), add=TRUE)
polymap(bodmin$poly, add=TRUE)
bodmin.xy <- coordinates(bodmin[1:2])
apply(bodmin$poly, 2, range)
grd1 <- GridTopology(cellcentre.offset=c(-5.2, -11.5), cellsize=c(0.2, 0.2), cells.dim=c(75,100))
k100 <- spkernel2d(bodmin.xy, bodmin$poly, h0=1, grd1)
k150 <- spkernel2d(bodmin.xy, bodmin$poly, h0=1.5, grd1)
k200 <- spkernel2d(bodmin.xy, bodmin$poly, h0=2, grd1)
k250 <- spkernel2d(bodmin.xy, bodmin$poly, h0=2.5, grd1)
df <- data.frame(k100=k100, k150=k150, k200=k200, k250=k250)
kernels <- SpatialGridDataFrame(grd1, data=df)
spplot(kernels, checkEmptyRC=FALSE, col.regions=terrain.colors(16), cuts=15)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-13 10:48 , Processed in 0.031746 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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