[R] cannot load .sav-files in R 3.4.0

Anthony Damico ajdamico at gmail.com
Mon May 1 16:10:04 CEST 2017


hi, i don't think foreign::read.spss or haven::read_spss have ever worked
with a handful of the ess files, but library(memisc) does.  you are better
off loading ess with library(lodown) because the drudge work has already
been done--


    library(devtools)
    devtools::install_github("ajdamico/lodown")
    library(lodown)
    ess_cat <- get_catalog( "ess" , output_dir = "C:/My Directory/ESS" )

    # which entries do you want?
    head(ess_cat)

    # how about wave 7 only
    sub_ess_cat <- subset( ess_cat , wave == 7 )

    # replace the email address with whatever you registered with
    lodown( "ess" , sub_ess_cat , your_email = "email at address.com" )


    x <- readRDS( "C:/My Directory/ESS/2014/ESS7csCH.rds" )

    # looks good
    head( x )



On Mon, May 1, 2017 at 6:22 AM, <katharina.manderscheid at posteo.de> wrote:

> after updating R from 3.3.3. to 3.4.0 i cannot import spss-data files
> anymore. for the european social survey (europeansocialsurvey.org) i get
> this warning:
> re-encoding from CP1252
> Fehler in levels<-(*tmp*, value = if (nl == nL) as.character(labels) else
> paste0(labels, :
> factor level [3] is duplicated
> Zusätzlich: Warnmeldung:
> In read.spss(file, use.value.labels = use.value.labels, to.data.frame =
> to.data.frame, :
> //filepath/ESS7CH.sav: Unrecognized record type 7, subtype 18 encountered
> in system file
>
> using the package foreign does the same.
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posti
> ng-guide.html
> and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]



More information about the R-help mailing list