Paul,
That is a bug; seems to occur only for patches that are two cells from the
bottom of the raster. I'll look into it, thanks for reporting.
Robert

On Mon, Nov 7, 2011 at 9:35 AM, pgalpern <pgalpern@gmail.com> wrote:

> Hello!
>
> Perhaps I am doing something wrong, here, but in the following case the
> edge() function in the raster package appears to find an edge that is two
> cells wide when I don't think it should.
>
> There are three objects on the raster, each is a 9 cell square.  One of
> these squares is one cell away from the border of the raster.  It is on
> this square that the error occurs.
>
> library(raster)
> download.file("http://**nricaribou.cc.umanitoba.ca/R/**edgeissue.asc<http://nricaribou.cc.umanitoba.ca/R/edgeissue.asc>",
> "~/edgeissue.asc")
> edgeIssue <- raster("~/edgeissue.asc")
> findEdge <- edge(edgeIssue, type="inner")
> plot(findEdge)
>
> which((findEdge==1 & is.na(edgeIssue))[])
> ## Gives cell numbers: 12037 12038 12039
> ## These are outside any of the squares on the raster edgeIssue
>
> Any thoughts would be appreciated.
>
> Thanks,
> Paul
>
> --
> Paul Galpern, PhD Candidate
> Natural Resources Institute
> 70 Dysart Road
> University of Manitoba
> Winnipeg, Manitoba, Canada R3T 2M6
> http://borealscape.ca
>
> ______________________________**_________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/**listinfo/r-sig-geo<https://stat.ethz.ch/mailman/listinfo/r-sig-geo>
>

	[[alternative HTML version deleted]]

