Skip to content
Prev 3552 / 29559 Next

convert x,y,z data into a grid

This would be my way, with kernel smoothing from spatstat function smooth.ppp:

Let's say that "cosa" is a dataframe with three columns x, y and z .

library(rgl)

library(ecespa) # for function "haz.ppp"; it requires (and load)  spatstat

cosa.ppp <- haz.ppp (cosa) # makes ppp object 
"easily". You may consider also functions "ppp" or "as.ppp" in spatstat.

cosa.s <- smooth.ppp (cosa.ppp)  #  spatial 
smoothing of numeric values observed

cosa.p <- persp.im (cosa.s) # 3D transformation 
matrix returned by persp.default

persp3d(cosa.p) # your perspective plot


Regards, Marcelino
At 14:33 07/05/2008, ONKELINX, Thierry wrote:
________________________________

Marcelino de la Cruz Rot

Departamento de  Biolog?a Vegetal
E.U.T.I. Agr?cola
Universidad Polit?cnica de Madrid
28040-Madrid
Tel.: 91 336 54 35
Fax: 91 336 56 56
marcelino.delacruz at upm.es