Skip to content
Back to formatted view

Raw Message

Message-ID: <04d901ce6cf8$fdfd05b0$f9f71110$@tamu.edu>
Date: 2013-06-19T14:26:30Z
From: David L Carlson
Subject: Retrieving Labels from vars/cols
In-Reply-To: <CAN5YmCHMM-2PTo_j3TBHzJ0FjVf6AfqkekdtFxfJ0YF-_ja1Ng@mail.gmail.com>

Perhaps you are talking about the variable.labels attribute returned
by read.spss in package foreign? If so, you should try the
attributes() or the attr() function:

?attributes
?attr

-------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: r-help-bounces at r-project.org
[mailto:r-help-bounces at r-project.org] On Behalf Of Adams, Jean
Sent: Wednesday, June 19, 2013 8:57 AM
To: L?vio Cipriano
Cc: R help
Subject: Re: [R] Retrieving Labels from vars/cols

I'm not sure what you mean by the $variables.label property.
Are you just looking for the column names?
If your data frame is called "df", try
     names(df)

Jean


On Tue, Jun 18, 2013 at 2:16 PM, Lmvio Cipriano
<lcmail4lists at gmail.com>wrote:

> Hi,
>
> How can I read/retrieve the Labels strings of the $variables.label
> proprety of
> a data Frame?
>
> Regards
>
> Lmvio Cipriano
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]