Hi all

I have a problem with the "poly" part of the kernel12d. 

I think the "NA's" are what is causing this as when I look at nz.poly
there are few there. Is there a simple way of interpolating values to
nz.poly.

Kernal smoothing:

nz.poly <- read.shape("auk_district_a", dbf.data = TRUE)
nz.poly <- Map2poly(nz.poly)
nz.poly <- nz.poly[[1]]
nz.poly

,] 1796099 5914222
[1770,] 1795829 5914401
[1771,] 1795491 5913800
[1772,]      NA      NA
[1773,] 1770651 5925976
[1774,] 1768973 5929088
[1775,] 1769083 5930230
[1776,] 1771047 5931605
[1777,] 1771103 5933282
[1778,] 1772693 5931970
[1779,] 1772233 5931515
[1780,] 1772788 5930695
[1781,] 1772913 5929173
[1782,] 1772160 5929168
[1783,] 1772096 5927332
[1784,] 1770851 5926815
[1785,] 1770651 5925976


> # Kernel density estimate:
> dat.kern <- kernel2d(dat.pp, poly = nz.poly, h0 = h0, nx = 100, ny =
100, kernel = "quartic")
Xrange is  1704011 1828973 
Yrange is  5872499 6008841 
Doing quartic kernel
Error in kernel2d(dat.pp, poly = nz.poly, h0 = h0, nx = 100, ny = 100,
: 
  NA/NaN/Inf in foreign function call (arg 4)

I appear to produce a reasonable map although some of the smoothed
values are outside the map boundary:

nz.poly <- read.shape("auk_district_a", dbf.data = TRUE)
nz.poly <- nz.poly$Shapes[[1]]$verts

Andrew McFadden MVS BVSc
Incursion Investigator
Investigation & Diagnostic Centres - Wallaceville Biosecurity New 
Zealand Ministry of Agriculture and Forestry

Phone 04 894 5600 Fax 04 894 4973 Mobile 029 894 5611 Postal address: 
Investigation and Diagnostic Centre- Wallaceville Box 40742 Ward St 
Upper Hutt


########################################################################
This email message and any attachment(s) is intended solely for the
addressee(s) named above. The information it contains is confidential
and may be legally privileged.  Unauthorised use of the message, or the
information it contains, may be unlawful. If you have received this
message by mistake please call the sender immediately on 64 4 8940100
or notify us by return email and erase the original message and
attachments. Thank you.

The Ministry of Agriculture and Forestry accepts no responsibility for
changes made to this email or to any attachments after transmission from
the office.
########################################################################

	[[alternative HTML version deleted]]


