1\name{spss.get}
2\alias{spss.get}
3\title{Enhanced Importing of SPSS Files}
4\description{
5\code{spss.get} invokes the \code{read.spss} function in the
6\pkg{foreign} package to read an SPSS file, with a default output
7format of \code{"data.frame"}.  The \code{label} function is used to
8attach labels to individual variables instead of to the data frame as
9done by \code{read.spss}.  By default, integer-valued variables are
10converted to a storage mode of integer unless
11\code{force.single=FALSE}.  Date variables are converted to \R \code{Date}
12variables.  By default, underscores in names are converted to periods.
13}
14\usage{
15spss.get(file, lowernames=FALSE, datevars = NULL,
16         use.value.labels = TRUE, to.data.frame = TRUE,
17         max.value.labels = Inf, force.single=TRUE,
18         allow=NULL, charfactor=FALSE)
19}
20\arguments{
21  \item{file}{input SPSS save file.  May be a file on the WWW, indicated
22  by \code{file} starting with \code{'http://'}.}
23  \item{lowernames}{set to \code{TRUE} to convert variable names to
24	lower case}
25  \item{datevars}{vector of variable names containing dates to be
26	converted to \R internal format}
27  \item{use.value.labels}{see \code{\link[foreign]{read.spss}}}
28  \item{to.data.frame}{see \code{\link[foreign]{read.spss}}; default is
29	\code{TRUE} for \code{spss.get}}
30  \item{max.value.labels}{see \code{\link[foreign]{read.spss}}}
31  \item{force.single}{set to \code{FALSE} to prevent integer-valued
32	variables from being converted from storage mode \code{double} to
33	\code{integer}}
34  \item{allow}{a vector of characters allowed by \R that should not be
35	converted to periods in variable names.  By default, underscores in
36	variable names are converted to periods as with \R before version 1.9.}
37  \item{charfactor}{set to \code{TRUE} to change character variables to
38	factors if they have fewer than n/2 unique values.  Blanks and null
39	strings are converted to \code{NA}s.}
40}
41\value{
42  a data frame or list
43}
44\author{Frank Harrell}
45\seealso{\code{\link[foreign]{read.spss}},\code{\link{cleanup.import}},\code{\link{sas.get}}}
46
47\examples{
48\dontrun{
49w <- spss.get('/tmp/my.sav', datevars=c('birthdate','deathdate'))
50  }
51}
52\keyword{interface}
53\keyword{manip}
54\keyword{file}
55\concept{SPSS data file}
56