I have some questions:
I got an error. I dont't know why.
Somebody to help me?
Thanks,
Virginia Ragoni
require(spgwr)
require(foreign)
x <- read.shape("cidade.shp")
plot(x)
mappolys <- Map2poly1(x,as.character(x$att.data$ID9100),raw=FALSE)
mapbbs=Map2bbs(x)
mapcents=get.Pcent(x)
tab= x$att.data
# c?lculo da largura da banda
sjc.bw <- gwr.sel((tab$TX_CRESC~tab$LOGDEN),data=tab,coords=mapcents)
# error - Erro em spDistsN1(bbox, bbox[2, ], longlat) :
# NA/NaN/Inf em chamada de fun??o externa (argumento 1)
sp.gauss <- gwr((tab$PERIDOSO~tab$PERREN20),data=tab,coords=mapcents,
bandwidth=sjc.bw, hatmatrix=TRUE)
using gwr
7 messages · Virginia, Raphael Saldanha, Edzer Pebesma +2 more
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20081111/51dd23b3/attachment.pl>
It is no problem for us to read all this Brazilian (eh, sorry, Portugese), but it is hard to reproduce your error without having access to your, or similar, data. -- Edzer
Raphael Saldanha wrote:
Ol? Virg?nia! Legal ver brazileiros nessa lista! Vou dar uma olhada no seu problema e lhe escrevo. On Tue, Nov 11, 2008 at 10:06 AM, Virginia <virginia at dpi.inpe.br> wrote:
I have some questions:
I got an error. I dont't know why.
Somebody to help me?
Thanks,
Virginia Ragoni
require(spgwr)
require(foreign)
x <- read.shape("cidade.shp")
plot(x)
mappolys <- Map2poly1(x,as.character(x$att.data$ID9100),raw=FALSE)
mapbbs=Map2bbs(x)
mapcents=get.Pcent(x)
tab= x$att.data
# c?lculo da largura da banda
sjc.bw <- gwr.sel((tab$TX_CRESC~tab$LOGDEN),data=tab,coords=mapcents)
# error - Erro em spDistsN1(bbox, bbox[2, ], longlat) :
# NA/NaN/Inf em chamada de fun??o externa (argumento 1)
sp.gauss <- gwr((tab$PERIDOSO~tab$PERREN20),data=tab,coords=mapcents,
bandwidth=sjc.bw, hatmatrix=TRUE)
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
------------------------------------------------------------------------
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de/ http://www.springer.com/978-0-387-78170-9 e.pebesma at wwu.de
On Tue, 11 Nov 2008, Virginia wrote:
I have some questions: I got an error. I dont't know why. Somebody to help me?
Your code template is not helpful. A more recent version below, which will probably show that your input data are in error:
Thanks,
Virginia Ragoni
require(spgwr)
require(foreign)
x <- read.shape("cidade.shp")
plot(x)
mappolys <- Map2poly1(x,as.character(x$att.data$ID9100),raw=FALSE)
mapbbs=Map2bbs(x)
mapcents=get.Pcent(x)
tab= x$att.data
# c?lculo da largura da banda
sjc.bw <- gwr.sel((tab$TX_CRESC~tab$LOGDEN),data=tab,coords=mapcents)
library(maptools)
library(spgwr)
tab <- readShapeSpatial("cidade.shp")
# my guess is that there are non-finite centroids in the earlier version,
# certainly the distance calculation is failing
sjc.bw <- gwr.sel(TX_CRESC ~ LOGDEN, data=tab)
# error - Erro em spDistsN1(bbox, bbox[2, ], longlat) : # NA/NaN/Inf em chamada de fun??o externa (argumento 1)
Please always include the output of traceback() after an error, and of sessionInfo() to show your platform and package versions. Roger
sp.gauss <- gwr((tab$PERIDOSO~tab$PERREN20),data=tab,coords=mapcents, bandwidth=sjc.bw, hatmatrix=TRUE)
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no
I can't read this Brazilian (Portugese :)), but it seems that the distance calculation is in error (possibly some coordinates were missing causing distance calculation yield NA/NaN/Inf value), which leads to distance not being able to calculated. Like Edzer mentioned, if a sample set of your data is provided, we might be able to track the source. Hope this helps. Best, Danlin
Edzer Pebesma wrote:
It is no problem for us to read all this Brazilian (eh, sorry, Portugese), but it is hard to reproduce your error without having access to your, or similar, data. -- Edzer Raphael Saldanha wrote:
Ol? Virg?nia! Legal ver brazileiros nessa lista! Vou dar uma olhada no seu problema e lhe escrevo. On Tue, Nov 11, 2008 at 10:06 AM, Virginia <virginia at dpi.inpe.br> wrote:
I have some questions:
I got an error. I dont't know why.
Somebody to help me?
Thanks,
Virginia Ragoni
require(spgwr)
require(foreign)
x <- read.shape("cidade.shp")
plot(x)
mappolys <- Map2poly1(x,as.character(x$att.data$ID9100),raw=FALSE)
mapbbs=Map2bbs(x)
mapcents=get.Pcent(x)
tab= x$att.data
# c?lculo da largura da banda
sjc.bw <- gwr.sel((tab$TX_CRESC~tab$LOGDEN),data=tab,coords=mapcents)
# error - Erro em spDistsN1(bbox, bbox[2, ], longlat) :
# NA/NaN/Inf em chamada de fun??o externa (argumento 1)
sp.gauss <- gwr((tab$PERIDOSO~tab$PERREN20),data=tab,coords=mapcents,
bandwidth=sjc.bw, hatmatrix=TRUE)
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
------------------------------------------------------------------------
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
___________________________________________ Danlin Yu, Ph.D. Assistant Professor Department of Earth & Environmental Studies Montclair State University Montclair, NJ, 07043 Tel: 973-655-4313 Fax: 973-655-4072 email: yud at mail.montclair.edu webpage: csam.montclair.edu/~yu
8 days later
On Thu, 20 Nov 2008, Virginia wrote:
Hi list, I would like to know if R does kernel smooth with borders restriction.
Please use the list as described in the posting guide for all R lists: http://www.r-project.org/posting-guide.html You have asked a new question, but have not started a new thread, so the subject of your question is not connected with the question, but continues the thread you started 10 days ago. New questions should start a new thread, which means writing a fresh message, not replying to an existing message. Changing the subject does not help either. Your question seems to be about point pattern analysis. Please see the spatial task view on CRAN - you will see that there is some information there that may help. When you have consulted that information, start a new thread if you still need help, with a clear description of your problem. Hope this helps Roger
Virginia
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no