search for: healthyyouth

Displaying 1 result from an estimated 1 matches for "healthyyouth".

2010 May 25
1
Merging dataframe with list
I often read SPSS system files (*.sav) into R using the 'read.spss' function from the 'foreign' library. To retain all the meta data, i.e. 'variable labels', I call the function like this: test.sav <- read.spss('http://www.cdc.gov/healthyYouth/shpps/2006/spss/envs2006.sav', to.data.frame=FALSE, use.value.labels=TRUE ) This returns a list, which is fine. However. How do I merge data to this list, keeping the list components intact? Let's assume I have a dataframe that looks like this: df <- data.frame(id=rep(1:100),data=r...