[R-sig-Geo] How to obtain name of Map object on graphic device?
Edzer J. Pebesma
e.pebesma at geog.uu.nl
Wed Aug 24 12:00:25 CEST 2005
Susumu Tanimura wrote:
>Hi there,
>
>My question is how to obtain a name of Map object currently on graphic
>device. I had a look at help, documents, or web sites, however, it is
>still unclear.
>
>It is obvious when I myself plot Map object, but I would like to
>obtain it automatically inside my function.
>
>Thank you very much in advance.
>
>--
>Susumu Tanimura
>
>_______________________________________________
>R-sig-Geo mailing list
>R-sig-Geo at stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
Susuma, I think you can find the answer in the example section
of the help page for substitute:
myplot <- function(x, y)
plot(x, y, xlab=deparse(substitute(x)),
ylab=deparse(substitute(y)))
So, try for instance:
mplot=function(x) { plot(x); title(deparse(substitute(x))) }
--
Edzer
More information about the R-sig-Geo
mailing list