In further offline discussion with the poster it was explained that
the purpose of this is to display the icon object and not to return an
instantiatedProtoMethod which was what the code was attempting to do.
That is in proto, g$icon is not the icon object. It is the icon method
instantiated with
Dear all,
In mucking around with ggplot2, I've hit the following snag,
library(ggplot2)
# this returns a grob, OK
GeomAbline$icon()
# lines[GRID.lines.9]
# this returns the function icon, OK
GeomAbline$icon
# proto method (instantiated with ): function (.)
# linesGrob(c(0, 1), c(0.2, 0.8))
#
... without answering my previous question, I have just found a
fortune-hate workaround,
getIcon - function(geom){
st - paste(Geom, firstUpper(geom),$icon, sep=)
eval(parse(text=st))
}
getIcon(abline)
I'm still curious about the get() behaviour though.
Best,
baptiste
This may be a bug in objects of class instantiatedProtoMethod. I
tried it with the devel version of proto and got no error so you could
try that. I will send it to you offline for your try.
On Thu, Oct 8, 2009 at 1:02 PM, baptiste auguie
baptiste.aug...@googlemail.com wrote:
Dear all,
In
4 matches
Mail list logo