[R] From "deldir"
Rolf Turner
r.turner at auckland.ac.nz
Sun May 18 00:25:52 CEST 2014
On 18/05/14 03:56, Elham Daadmehr wrote:
> Dear all,
> Please guide me in following situation.
> I use these function from "deldir" package.
>
> x <- runif(20)
> y <- runif(20)
> z <- deldir(x,y,rw=c(0,1,0,1))
> w <- tile.list(z)
> plot(w)
> ccc <- heat.colors(2)
> plot(w,fillcol=ccc,close=TRUE)
>
>
> Is each cell red with prob 1/2? or cells were colored deterministic?
The colours are (in some sense) deterministic. The tiles are plotted in
the order in which the points appear in the data set. The fillcol
vector is "recycled" to give a vector of length equal to the number of
points. Thus the tile corresponding to (x[1],y[1]) gets coloured with
the colour given by ccc[1]. The tile corresponding to (x[2],y[2]) gets
coloured with the colour given by ccc[2]. The tile corresponding to
(x[3],y[3]) gets coloured with the colour given by ccc[1] again. The
tile corresponding to (x[4],y[4]) gets coloured with the colour given by
ccc[2] again. And so on.
cheers,
Rolf Turner
More information about the R-help
mailing list