Skip to content
Prev 325628 / 398513 Next

Retrieving Labels from vars/cols

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: