[R] geoR, plot of variog4 lines incomplete
Michael Fuller
mmfuller at tiem.utk.edu
Fri Jun 2 20:54:46 CEST 2006
I'm using R for Mac OSX version 1.14 (2129) and the geoR package
version 1.6-5 (the current version in the R repository). I'm running
R in OS 10.4.6 on a Mac G4 iBook (933MHz, 640 MB DDR SDRAM). I
searched the R archive and did not find a posting on this issue.
I want to use the variog and variog4 functions of geoR to
characterize the pattern of spatial autocorrelation of tree density
on a forest plot. But I get incomplete line plots when I plot the
output of variog4, compared to the plot for the output of variog. I'm
using the same geodata for each plot.
I've attached 2 graphs to illustrate. The first is a plot of a 90-
degree directional variogram created using variog:
> trees90.vgm<-variog(trees.geo,max.dist=100,direction=pi/2)
> plot(trees90.vgm)
The second is a plot of a multidirectional variogram created using
variog4:
> trees.vgm4<-variog4(trees.geo,max.dist=100)
> plot(trees.vgm4)
The graphs are also available at:
www.tiem.utk.edu/~mmfuller/R_plots.pdf
You can see that the 90 degree line in the multi-line plot from
variog4 (dotted green line) does not include all the data shown in
the single 90 degree variogram (circles) plotted using variog. The
lines for other directions in the variog4 plot are also incompletely
drawn.
Any suggestions as to what's causing this plotting problem?
The raw data is a file containing 3 columns x,y,z. The x,y values are
the coordinates of quadrats placed end to end in a grid on a forest
plot. The z values are the density of trees in each quadrat. Each
quadrat is 15m square and the plot dimensions are 220x780m. The data
are arranged in columns (coordinates 20 to 240) and rows (coordiantes
765 to 150) representing the data posting of each quadrat.
I create geodata objects using:
trees.geo<-read.geodata("tree.dat",header=TRUE)
Here is a data sample:
x y z
20 765 0.1556
35 765 0.1556
50 765 0.0356
65 765 0.0622
80 765 0.0933
95 765 0.0400
110 765 0.1111
125 765 0.1244
140 765 0.0800
155 765 0.0667
170 765 0.0711
185 765 0.0889
200 765 0.0667
215 765 0.0844
20 750 0.1067
35 750 0.0800
50 750 0.0578
65 750 0.0622
80 750 0.0578
95 750 0.0933
110 750 0.0844
125 750 0.1200
140 750 0.0711
155 750 0.0711
170 750 0.0711
185 750 0.0578
200 750 0.0489
215 750 0.0933
etc
I have repeated the analysis using different quadrat sizes and the
problem of incomplete drawing of lines is unaffected.
Any suggestions are appreciated!
Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trees.vgm4.pdf
Type: application/pdf
Size: 4894 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20060602/62607e55/attachment.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trees90.vgm.pdf
Type: application/pdf
Size: 3863 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20060602/62607e55/attachment-0001.pdf
-------------- next part --------------
More information about the R-help
mailing list