Re: [R] proto and get()

2009-10-09 Thread Gabor Grothendieck
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

[R] proto and get()

2009-10-08 Thread baptiste auguie
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)) #

Re: [R] proto and get()

2009-10-08 Thread baptiste auguie
... 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

Re: [R] proto and get()

2009-10-08 Thread Gabor Grothendieck
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