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]]

______________________________________________
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.

Reply via email to