Prof Brian D Ripley
Mon, 19 Jul 1999 08:18:33 +0100 (BST)

On Mon, 19 Jul 1999, Venables, Bill (CMIS, Cleveland) wrote:

> You might think about using structure()
> fred <- structure(vector("list", length(happy)), names = names(happy))
> and in fact you can add as many attributes as you like.  This seems a better
> plan than tweaking vector() (where do you stop?) and maintains consistency
> with S3 at this low level.
> It must be said, though, this natural and innocent looking idiom that I once
> used quite a lot in S3 code had nasty consequences in going from S3 to S4,
> (as BDR frequently reminds me!)

(When used for setting classes instead of class<-, that is.)

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: