Re: [R] accessing the attr(*, label.table) after importing from spss

2010-08-26 Thread moleps
Thx... The following seems to work. However I´m sure there is a more elegant solution to it tre-dat b-length(dat) attr(dat,label.table)-a for (i in 1:b){ if(!is.null(a[[i]]) length(levels(as.factor(dat[,i])))==length(a[[i]])) {

[R] accessing the attr(*,label.table) after importing from spss

2010-08-25 Thread moleps
Dear all, I just received a file from a colleague in spss. The read.spss could not finish the file due to an error (Unrecognized record type 7, subtype 18 encountered in system file) so instead I converted the file using stat-transfer. Looking at my data I see that most labels are in the