Hi I am new to R and am trying to set up a two-dimensional array/matrix with
the elements defined by the function similar to below. Been trying to use
outer with apply but can't seem to get the indexing quite right. Is their a
simple way of accomplishing this task ??

                      -----
                    /
                   |     1  x < 0.5 & y < 0.5
                   |
                  /      2  x < 0.5 & y > 0.5
                /
G(x,y) =   \
                 \
                 |       3  x > 0.5 & y < 0.5
                 |
                 \       4  x > 0.5 & y > 0.5
                   -----
-- 
Thanks in advance
Leon Adams

	[[alternative HTML version deleted]]

