Re: [R] Smoothing a persp graph

2012-06-19 Thread David Winsemius
...@comcast.net] Sent: Tuesday, June 19, 2012 10:00 AM To: dcarl...@tamu.edu Cc: "'Kehl Dániel'"; r-help@r-project.org Subject: Re: [R] Smoothing a persp graph On Jun 19, 2012, at 10:02 AM, David L Carlson wrote: kde2d is for two dimensional data. The persp graph is 3d. Huh

Re: [R] Smoothing a persp graph

2012-06-19 Thread Bert Gunter
?loess, mgcv, kriging, ... There must be hundreds. Have you consulted the CRAN "spatial" task view? -- Bert On Tue, Jun 19, 2012 at 8:34 AM, Guillaume Chapron < carnivorescie...@gmail.com> wrote: > On Jun 19, 2012, at 10:02 AM, David L Carlson wrote: > > kde2d is for two dimensional data. The p

Re: [R] Smoothing a persp graph

2012-06-19 Thread David L Carlson
standard problem in geostatistics. --- David 2 > -Original Message- > From: David Winsemius [mailto:dwinsem...@comcast.net] > Sent: Tuesday, June 19, 2012 10:00 AM > To: dcarl...@tamu.edu > Cc: "'Kehl Dániel'"; r-help@r-project.org > Subject: Re: [R] Smo

Re: [R] Smoothing a persp graph

2012-06-19 Thread Guillaume Chapron
On Jun 19, 2012, at 10:02 AM, David L Carlson wrote: kde2d is for two dimensional data. The persp graph is 3d. Huh? The question asked about plotting data that was 2d. The third dimension was to be the density. kde2d in package MASS or the similarly named function in package KernSmooth would

Re: [R] Smoothing a persp graph

2012-06-19 Thread David Winsemius
.org [mailto:r-help-bounces@r- project.org] On Behalf Of Kehl Dániel Sent: Tuesday, June 19, 2012 8:42 AM To: r-help@r-project.org Subject: Re: [R] Smoothing a persp graph Take a look at the kde2d function in the MASS package, maybe it helps. Best kd 2012.06.19. 14:26 keltezissel, Guillaume Cha

Re: [R] Smoothing a persp graph

2012-06-19 Thread David L Carlson
om: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Kehl Dániel > Sent: Tuesday, June 19, 2012 8:42 AM > To: r-help@r-project.org > Subject: Re: [R] Smoothing a persp graph > > Take a look at the > > kde2d > function in the MASS package, maybe

Re: [R] Smoothing a persp graph

2012-06-19 Thread Kehl Dániel
Take a look at the kde2d function in the MASS package, maybe it helps. Best kd 2012.06.19. 14:26 keltezéssel, Guillaume Chapron írta: > Hi, > > I'm unable to find a way to smooth data for a persp() graph. > > Example, suppose that I have data x,y,z like this: > > x<- 1:10 > y<- 1:10 > > k<- 20

[R] Smoothing a persp graph

2012-06-19 Thread Guillaume Chapron
Hi, I'm unable to find a way to smooth data for a persp() graph. Example, suppose that I have data x,y,z like this: x <- 1:10 y <- 1:10 k <- 20 z <- outer(x, y, "*") + matrix( k*runif(100, -1, 1), 10, 10) persp(x, y, z, theta = 35, phi = 25) The graph is not very nice. Is there a way to smooth