[R-sig-Geo] How to plot the grid figure using R?

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Wed Dec 12 09:46:34 CET 2007


Have a look at the "sp" package.

x=runif(100,0,100)
y=runif(100,0,100)
dbh=runif(100,1,100)
rdata=data.frame(x,y,dbh)

library(sp)
coordinates(rdata) <- ~ x + y
spplot(rdata, zcol = "dbh")

HTH,

Thierry 


----------------------------------------------------------------------------
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium 
tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be 
www.inbo.be 

Do not put your faith in what statistics say until you have carefully considered what they do not say.  ~William W. Watt
A statistical analysis, properly conducted, is a delicate dissection of uncertainties, a surgery of suppositions. ~M.J.Moroney

-----Oorspronkelijk bericht-----
Van: r-sig-geo-bounces at stat.math.ethz.ch [mailto:r-sig-geo-bounces at stat.math.ethz.ch] Namens Jian Zhang
Verzonden: woensdag 12 december 2007 2:01
Aan: R-help; R_GEO
Onderwerp: [R-sig-Geo] How to plot the grid figure using R?

Now I have the forest plot data with x, y locations, and I measured the DBH for every indivicuals.

The data looks like that:
x=runif(100,0,100)
y=runif(100,0,100)
dbh=runif(100,1,100)
rdata=data.frame(x,y,dbh)
> rdata[1:5,]
           x         y      dbh
1 99.5354145  1.412844 34.10112
2  0.8259361 87.737036 39.12914
3  6.5678613 65.699032 22.55990
4 67.2987881 72.053877 45.83978
5  2.2491372 23.622898 68.77065

My question is: How can I plot the grid (25¡Á25,5¡Á5,...) figure by DBH?
Can you introduce a simply method to do it by R language? I know that it can be done very easy by the software ArcGis.

¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡
¡¡¡¡¡¡¡¡


Thanks very much.

	[[alternative HTML version deleted]]




More information about the R-sig-Geo mailing list