Importing SPSS and CSV Files - Columns Excluded from Imported Data


#1

I am very new to the world of R and am trying to import large SPSS files (3500+ cases, 600+ variables) into R Studio. I started by saving the SPSS file as a CSV. When I imported that CSV, some of the columns were cut off from the data set in R Studio (i.e. about half of the variables in the original data set were not included). I tried to reduce the number of cases in the CSV to reduce the file size, which I don't think should be necessary, but still had the same problem. I then tried to import the SPSS file using read.spss, but once again, about half of the columns were not included when the file was imported into R Studio. What am I doing incorrectly?

Thank you.


#2

Have a look at the package haven:


#3

like @prosoitos said try using haven but with the original SPSS file. So haven::read_sav("the_name_of_your_data.sav") should work