Skip to content
Prev 3403 / 15274 Next

Slots as @title and @documentation in S-Plus

So R has two kinds of easy methods tag any variable: comment and attr.
I like both of them.
What a great R.
Thanks.

Wind
 
 
------------------ ???? ------------------
???: "Robert Sams"<robert at sanctumfi.com>;
????: 2008?12?19?(???) ??7:39
???: "Martin Becker"<martin.becker at mx.uni-saarland.de>; "Wind"<windspeedo at qq.com>; 
??: "r-sig-finance"<r-sig-finance at stat.math.ethz.ch>; 
??: RE: [R-SIG-Finance] Slots as @title and @documentation in S-Plus

 
Also see ?comment
[1] "The first time and so on."
Robert 

-----Original Message-----
From: r-sig-finance-bounces at stat.math.ethz.ch [mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of Martin Becker
Sent: 19 December 2008 08:02
To: Wind
Cc: r-sig-finance
Subject: Re: [R-SIG-Finance] Slots as @title and @documentation in S-Plus

You may use attributes, e.g.

attr(vMatrix,"title") <- "The first time and so on."
attr(vMatrix,"title")

(see ?attr for details, especially for the list of "reserved" attribute names).

Martin
Wind wrote:
--
Dr. Martin Becker
Statistics and Econometrics
Saarland University
Campus C3 1, Room 206
66123 Saarbruecken
Germany