-- Originally posted by (AT sourceforge.net): naught101 -- -- This ticket was imported from http://sourceforge.net/p/rkward/feature-requests/68 on 2017-05-31 14:48:57 +0100 -- rkward stores dataframe variable labels as variable attribute metadata. It's possible to get a single label, with rk.get.label\(dataframe\[,x\]\), where x is the variable you want. It would be good to get all the labels from a dataframe, and store them as a vector. There might be a simpler way to do this, but this works for me: rk.get.labels <- function\(dataframe\) \{ labelsvector <- c\(\) for \(i in 1:length\(dataframe\)\) \{ labelsvector <- c\(labelsvector,rk.get.label\(dataframe\[,i\]\)\) \} return\(labelsvector\) \}-- Labels: Plugins --
Thanks for the suggestion. I guess it's reasonable to add something like that. However, we really need to start documenting those functions, before we add too much. Let's see what we can do for the next release. Here's a one-line version of your function: rk.get.labels <- function \(df\) sapply \(df, rk.get.label\)
Thanks for reporting\! This is a generic message to let you know, that the requested feature is now implemented in the development version \( http://p.sf.net/rkward/svn \). Testing is always welcome, as are further comments on details of the implementation. This report will be closed, once the feature is available in an official release.
Now implemented in the SVN version of RKWard as rk.list.labels\(\). See http://p.sf.net/rkward/svn .
- **assigned_to**: nobody --> tfry - **summary**: Simple function to get labels from a dataframe. --> IMPLEMENTD IN SVN: function to get labels from a dataframe.
Closing as the feature is officially released in 0.6.0.
- **status**: open --> closed