Description Usage Arguments Value Author(s) See Also Examples
Predicts values based on a fitted gen.variogram model.
1 2 |
object |
'gv' fitted model (see 'gen.variogram'). |
newdata |
Real distances matrix to predict genetic distance by the fitted model. |
... |
Further arguments to be passed. |
Returns the matrix of predicted genetic distances.
Pedro Tarroso <ptarroso@cibio.up.pt>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(vipers)
data(d.gen)
# create a grid of the sampled area for interpolation
grid <- expand.grid(x=seq(-10,10,0.5), y=seq(30, 50, 0.5))
# create a distance matrix between samples
r.dist <- dist(vipers[,1:2])
# fit a variogram with defaults (spherical model) and estimation of range
gv <- gen.variogram(r.dist, d.gen)
gv <- gv.model(gv)
all.dist <- as.matrix(dist(grid))
result <- predict(gv, all.dist)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.