[R] Retrieving Labels from vars/cols

David Carlson dcarlson at tamu.edu
Wed Jun 19 16:26:30 CEST 2013

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:


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


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]]

More information about the R-help mailing list