[R] Export to SPSS without truncating variable names

dadrivr dadrivr at gmail.com
Sat Nov 21 20:11:02 CET 2009


I am trying to export a data frame to SPSS.  I am using write.foreign to
export the .txt data file and the .sps SPSS syntax file to read the .txt
file into SPSS.  I am running into problems because my data set includes
variable names that are longer than 8 characters, and the write.foreign
function attempts to truncate the variable names to 8 characters.  I receive
an error that some of the variable names were not successfully abbreviated
("I cannot abbreviate the variable names to eight or fewer letters") because
some of my variables, if truncated, would have the same variable name!  Is
there a way to export my data set to SPSS without truncating the variable
names in my data set.  Also, is there a way export the variable names and
the value labels?  Thanks so much for your help!
-- 
View this message in context: http://old.nabble.com/Export-to-SPSS-without-truncating-variable-names-tp26459395p26459395.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list