From: Roger Bivand <Roger.Bivand at nhh.no>
Sent: Mar 16, 2008 4:42 AM
To: modern82376 at mypacks.net
Cc: r-sig-geo at stat.math.ethz.ch
Subject: Re: [R-sig-Geo] writing shapefiles using write.pointShape
On Thu, 13 Mar 2008, modern82376 at mypacks.net wrote:
I'm also having issues with getting the gw.cov function to work for fit
points. Here's an example, using the same files...
pcavars <- names(surveypts[,4:8])
pcavars
[1] "pca1" "PCA2" "PCA3" "PCA4" "PCA5"
surv.cov <- gw.cov(data = surveypts, vars = pcavars, fit.points = fitpix, bw = survey.bw)
Error in gw.cov(surveypts, test, fit.points = fitpix, bw = survey.bw) :
unused argument(s) (fit.points = <S4 object of class "SpatialPixels">)
As far as I can tell, I'm using the same syntax as in the ggwr function.
Thanks again. =)
?gw.cov will help. The first argument is x= not data=, and fit.points=
should be fp=. So
surv.cov <- gw.cov(x=surveypts, vars=pcavars, fp=fitpix, bw=survey.bw)
ought to work. The functions are fairly different (no formula=), so
assuming that the arguments have the same names suggests that actually
reading the help pages might save time.