[rkward-users] Variable labels

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Tue Aug 14 09:30:48 UTC 2012


Hi,

sorry for the late reply.

On Tuesday 17 July 2012, Francois Maurice wrote:
> Two questions :
>  
> 1) Is it possible to write variable labels via the syntax ?

Yes. See ?rk.get.label .
  
> 2) Is it possible to export variables labels instead of variables name with
> write.table() ? 

You can use
    write.table(..., col.names=sapply(my.data, rk.get.label))
(substitute "my.data" with the name of your data.frame).

In the development version of RKWard, I have just added a convenience function 
"rk.list.labels()" to make it easier to extract variable labels from a 
data.frame. Also, rk.get.label() now behaves better, in case no label has been 
assigned. If you would like to try the development version, see 
http://p.sf.net/rkward/svn .

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-users/attachments/20120814/2835d94a/attachment.sig>


More information about the Rkward-users mailing list