From: Torsten Steuernagel (Torsten.Steuernagel@gmx.de)
Date: Fri 28 May 2004 - 06:55:20 EST
On 27 May 2004 at 19:12, Wolski wrote:
> But this document is quite intersting.
Which document are you refering to ?
> I have just two R questions which arised reading the document which a
> core members of the R-project cant find.
I can't find it either.
> 1. Is it intended to introduce privileged slots in the future version of
You are talking about access control like C++ (private, protected,
public) has, aren't you ? I can't answer for the R Core Team but I'm
also interested in a similar functionality. Please check the setClass()
docs for the "access" argument. I suppose this is intended to provide
such functionality in the future.
> 2. Is it true
> that one can gain execution speed by accessing slots using the
> function slots(object,name,check=FALSE)<-value would speed up
function (object, name, value)
arg <- substitute(name)
name <- as.character(arg)
"slot<-"(object, name, TRUE, value)
So "@<-" actually calls "slot<-". Using "slot<-" instead, you save the
additional overhead the call to "@<-" introduces. If there will be a real
performance gain in replacing "@<-" certainly depends on what you're
Remail@example.com mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:13 EST