1

I'm using R and have tried the foreign package, but cannot find a way to export R data frame into SPSS formats (e.g. sps) where the variable names are longer than 8 characters. No, i don't not wish to shrink the variable names, as I will incur many duplicates.

Does anyone know how to cleanly export R data frames into SPSS formats without change the data (e.g. shortening variable names)?

I am not looking for a work-around solution (i.e. manual coding), but searching for the existence of a package solution that improves up that of foreign.

thank you.

nerdlyfe
  • 487
  • 7
  • 21
  • can spss not read csv or any other plain text file format? – rawr Nov 29 '15 at 22:48
  • it can, but that's an extra step in a cross-team automation that I would rather not deal with, and doesn't really address the fundamental issue of R not being able to save to other formats (e.g. SPSS). – nerdlyfe Nov 30 '15 at 00:02
  • 2
    Have a look at [this question and answer](http://stackoverflow.com/q/10181730/1305688) – Eric Fail Nov 30 '15 at 00:20
  • that is a very helpful link. I wouldn't claim this answer is solved yet, but I think I can use that link as a work around. thank you eric. – nerdlyfe Nov 30 '15 at 03:12
  • this question has not been answered, "information from `label attribute` in R to `VARIABLE LABELS` in SPSS 2" does not answer the question. that answer provides a work-around. I am looking for a package solution and it is very possible that someone has built the correct package. Richard, you are inhibiting the development/exploration of this problem by marking as duplicate. – nerdlyfe Nov 30 '15 at 05:05

0 Answers0