Displaying 1 result from an estimated 1 matches for "adults11".
Did you mean:
adults
2005 Jun 13
3
assignment of inidividual variables from spss save files
...gt; ### I've read in my collaborator's sav file using read.spss, eg
> children = read.spss(filename)
> ### It has many variables
> length(children)
[1] 347
> ### and I would like to assign individual variables.
> ### I can of course type out all the ones I want, eg
> ADULTS11<-children[18]
> ### But I'm lazy, so tried:
> (function (x,n){assign(names(x[n]),x[n])})(children,2)
> ### where
> names(children[2])
[1] "ADNUTS06"
> ### but
> ADNUTS06
Error: Object "ADNUTS06" not found
> ### I've tried lots of variations...