Hey,

Nope, it crashes. R stops abruptly. I sent just 500 points to show the
structure of the data. There is in fact over 22,000 points and it is 3-D
data composing of x,y,z data

Cheers


On Wed, Dec 11, 2013 at 3:24 PM, Ben Bolker <bbolker@gmail.com> wrote:

> Shane Carey <careyshan <at> gmail.com> writes:
>
> >
> > it just keeps crashing on me,
> >
> > It seems to crash on this line
> >
> > rgl.surface(akima.li$x,akima.li$y,akima.li$z,color="green",alpha=c(0.5))
>
>   When I run the code you gave us along with the data you gave us,
> I get
>
> Error in rgl.surface(akima.li$X, akima.li$Y, akima.li$Z, color = "green",
>  :
>   rows < 2
>
>   Maybe this is what you mean by "crashing"?  (On this list, "crash"
> is usually reserved to mean that your instance of R stops abruptly ...
> the behaviour above would be called an "error").
>
>   Looking at the plot generated from the data you sent, all of
> the (X,Y) points lie on a 1-dimensional curve in the (X,Y) plane --
> it's not surprising that it's going to be hard to generate an
> interpolated surface from these points.
>
>   Or maybe I'm misunderstanding something.
>
> rgl.spheres(dat$X,dat$Z , dat$Y,1,color="red")
> rgl.bbox()
> # bivariate linear interpolation
> # interp:
> akima.li <- interp(dat$X, dat$Y, dat$Z,
>                    xo=seq(min(dat$X), max(dat$X), length = 100),
>                    yo=seq(min(dat$Y), max(dat$Y), length = 100))
> # interp surface:
> rgl.surface(akima.li$X,akima.li$Y,akima.li$Z,color="green",alpha=c(0.5))
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Shane

	[[alternative HTML version deleted]]

