Re: [R] attributes of a data.frame

2005-11-23 Thread Prof Brian Ripley
On Wed, 23 Nov 2005, Peter Dalgaard wrote: Prof Brian Ripley <[EMAIL PROTECTED]> writes: Why do you have names like 'pctx723' in the first place? I have never had a difficulty with using informative column names whereas you seem to require the extra complication of `variable labels'. Now we h

Re: [R] attributes of a data.frame

2005-11-23 Thread Peter Dalgaard
Prof Brian Ripley <[EMAIL PROTECTED]> writes: > Why do you have names like 'pctx723' in the first place? > > I have never had a difficulty with using informative column names whereas > you seem to require the extra complication of `variable labels'. > Now we have `` and allow _ in syntactic name

Re: [R] attributes of a data.frame

2005-11-23 Thread Prof Brian Ripley
Why do you have names like 'pctx723' in the first place? I have never had a difficulty with using informative column names whereas you seem to require the extra complication of `variable labels'. Now we have `` and allow _ in syntactic names it is even easier than it was. On Tue, 22 Nov 2005, M

Re: [R] attributes of a data.frame

2005-11-22 Thread Michael Friendly
It's hard for me to resist dipping my oar into this... Variable labels are so generally useful, both in documenting a dataset (what was 'pctx723' again?) and in producing readable output and graphs that it is a shame they are not provided in base R. If they were (and were used in print and plot m

Re: [R] attributes of a data.frame

2005-11-21 Thread Adrian DUSA
On Monday 21 November 2005 23:00, Duncan Murdoch wrote: > [...snip...] > I think it's just that the R core developers don't see the need for > them. If something is worth documenting, then you should write an .Rd > file or a vignette about it, and that gives you more flexibility than a > one line

Re: [R] attributes of a data.frame

2005-11-21 Thread Duncan Murdoch
On 11/21/2005 2:51 PM, Adrian DUSA wrote: > On Monday 21 November 2005 22:41, Duncan Murdoch wrote: >> [...snip...] >> Not all dataframes have the variable.labels attribute. I'm guessing >> you've installed some contributed package to add them, or are importing >> an SPSS datafile using read.spss.

Re: [R] attributes of a data.frame

2005-11-21 Thread Adrian DUSA
On Monday 21 November 2005 22:41, Duncan Murdoch wrote: > [...snip...] > Not all dataframes have the variable.labels attribute. I'm guessing > you've installed some contributed package to add them, or are importing > an SPSS datafile using read.spss. So don't expect varlab() or > variable.labels(

Re: [R] attributes of a data.frame

2005-11-21 Thread Duncan Murdoch
On 11/21/2005 2:18 PM, Adrian DUSA wrote: > Dear all, > > I noticed that a data.frame has four attributes: > - names > - row.names > - class > - variable.labels > > While one can use the first three (i.e. names(foo) or class(foo)), the fourth > one can only be used via: > attributes(foo)$variabl

Re: [R] attributes of a data.frame

2005-11-21 Thread Berton Gunter
- George E. P. Box > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Adrian DUSA > Sent: Monday, November 21, 2005 11:19 AM > To: r-help@stat.math.ethz.ch > Subject: [R] attributes of a data.frame > > > Dear all, > > I not

Re: [R] attributes of a data.frame

2005-11-21 Thread Berton Gunter
On Behalf Of Adrian DUSA > Sent: Monday, November 21, 2005 11:19 AM > To: r-help@stat.math.ethz.ch > Subject: [R] attributes of a data.frame > > > Dear all, > > I noticed that a data.frame has four attributes: > - names > - row.names > - class > - variable.la

[R] attributes of a data.frame

2005-11-21 Thread Adrian DUSA
Dear all, I noticed that a data.frame has four attributes: - names - row.names - class - variable.labels While one can use the first three (i.e. names(foo) or class(foo)), the fourth one can only be used via: attributes(foo)$variable.labels (which is kind of a tedious thing to type) Is it or w