[rkward-users] [rkward - Help] manipulating data.frame labels via script
SourceForge.net
noreply at sourceforge.net
Sat Oct 6 20:32:32 UTC 2007
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=4555823
By: fsando
Hi
First off - I am really impressed with what you are doing with rkward - thanks!
I am on
ubuntu 7.04
rkward 0.4.2 (kde 3.5.6)
R 2.4.1.
I breifly tried rkward 0.4.8 but reverted to 0.4.2.
My question regards adding labels to a data.frame via R-script.
I am in the process of moving a large project from SPSS to R/rkward for testing
out rkward in a real setting.
I have imported data as data.frame and the labels as a character vector. It
has more than 1400 variables so I need to be able to add labels to data.frames
via scripts.
I looked into how rkward stores labels and made this loop which apparently works
fine in 0.4.2: Labels are added, and recognized by the editor.
for(i in 1:length(ghdata)){
attr(ghdata[[i]],".rk.meta") <- list(label = ghlabels[i])
}
For one variable it would look something like this (adding a label to the first
variable in the data.frame):
attr(ghdata[[1]],".rk.meta") <- list(label = "This is a label")
In 0.4.8 I can only add labels in the editor but they disappear when I run this
code.
So my question is whether this is the intended behavior in 0.4.8, if so how
should I change my code so it will also work in the future.
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=165574
More information about the Rkward-users
mailing list