https://github.com/cran/sjPlot
Raw File
Tip revision: 60dc03cb2e7f88aa6a654894f9fe9688031b4e09 authored by Daniel Luedecke on 19 November 2014, 16:54:27 UTC
version 1.6
Tip revision: 60dc03c
sji.SPSS.Rd
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{sji.SPSS}
\alias{sji.SPSS}
\title{Import SPSS dataset as data frame into R}
\usage{
sji.SPSS(path, enc = NA, autoAttachVarLabels = FALSE)
}
\arguments{
\item{path}{The file path to the SPSS dataset.}

\item{enc}{The file encoding of the SPSS dataset.}

\item{autoAttachVarLabels}{if \code{TRUE}, variable labels will automatically be
attached to each variable as \code{"variable.label"} attribute.
See \code{\link{sji.setVariableLabels}} for details.}
}
\value{
A data frame containing the SPSS data. retrieve value labels with \code{\link{sji.getValueLabels}}
  and variable labels with \code{\link{sji.getVariableLabels}}.
}
\description{
Import data from SPSS, including NA's, value and variable labels.
}
\note{
This is a wrapper function for \code{\link{read.spss}} of the
        \code{foreign} package, using convenient parameter default
        settings.
}
\examples{
# import SPSS data set
# mydat <- sji.SPSS("my_spss_data.sav", enc="UTF-8")

# retrieve variable labels
# mydat.var <- sji.getVariableLabels(mydat)

# retrieve value labels
# mydat.val <- sji.getValueLabels(mydat)
}
\seealso{
\itemize{
           \item \href{http://www.strengejacke.de/sjPlot/datainit/}{sjPlot manual: data initialization}
           \item \href{http://www.strengejacke.de/sjPlot/sji.viewSPSS/}{sjPlot manual: inspecting (SPSS imported) data frames}
           \item \code{\link{sji.getValueLabels}}
           \item \code{\link{sji.getVariableLabels}}
           \item \code{\link{sji.convertToLabel}}
           \item \code{\link{sji.convertToValue}}
           \item \code{\link{sji.viewSPSS}}
           }
}

back to top