hello
when I try universal kriging, it gives this error:
> v.trend <- variogram(z~x+y,el4)
> new.fit <- fit.variogram(v.trend, vgm(1,"Exp",300,1))
> krige(el4$z~el4$x+el4$y,el4, model=new.fit, newdata=mask_SG)
Error in gstat.formula.predict(d$formula, newdata, na.action = na.action) :
hello
when I create a directional variogram, it usually gives different
shaped variograms according to its direction.
(like this cvgm <- variogram(z ~1, data=el4 ,boundaries = seq(0,2000, by
= 50), alpha=c(0,45,90,135,180,225,270)) )
In these cases, which variogram's sill , nugget and
Yong Li wrote:
> require(maptools)
>
> #read in shape file
> pts <- readShapePoints(system.file("shapes/baltim.shp",
> package="maptools")[1])
>
> #define the dimension of grids
> x.min <- summary(pts)$bbox[1]
> y.min <- summary(pts)$bbox[2]
> x.max <- summary(pts)$bbox[3]
> y.max <- summary(pts)
require(maptools)
#read in shape file
pts <- readShapePoints(system.file("shapes/baltim.shp",
package="maptools")[1])
#define the dimension of grids
x.min <- summary(pts)$bbox[1]
y.min <- summary(pts)$bbox[2]
x.max <- summary(pts)$bbox[3]
y.max <- summary(pts)$bbox[4]
cellsize <- 20
x.n <- ro
You may want to use spsample, or, if you selected the points in the
polygon with overlay and want to sample from them, use function sample.
It is hard for us to see what you're trying and cannot get without
(reproducible) example code.
--
Edzer
Yong Li wrote:
> I want to overlay points with a p
I want to overlay points with a polygon, get the points in the
polygon and then try to just select a point randomly from them.
I have tried using overlay, but it did not give me what I really
want. Any help will be appreciated.
Yong
___
R-sig-Geo mail