spss.get | R Documentation |
spss.get
invokes the read.spss
function in the
foreign package to read an SPSS file, with a default output
format of "data.frame"
. The label
function is used to
attach labels to individual variables instead of to the data frame as
done by read.spss
. By default, integer-valued variables are
converted to a storage mode of integer unless
force.single=FALSE
. Date variables are converted to R Date
variables. By default, underscores in names are converted to periods.
spss.get(file, lowernames=FALSE, datevars = NULL,
use.value.labels = TRUE, to.data.frame = TRUE,
max.value.labels = Inf, force.single=TRUE,
allow=NULL, charfactor=FALSE, reencode = NA)
file |
input SPSS save file. May be a file on the WWW, indicated
by |
lowernames |
set to |
datevars |
vector of variable names containing dates to be converted to R internal format |
use.value.labels |
see |
to.data.frame |
see |
max.value.labels |
see |
force.single |
set to |
allow |
a vector of characters allowed by R that should not be converted to periods in variable names. By default, underscores in variable names are converted to periods as with R before version 1.9. |
charfactor |
set to |
reencode |
see |
a data frame or list
Frank Harrell
read.spss
,cleanup.import
,sas.get
## Not run:
w <- spss.get('/tmp/my.sav', datevars=c('birthdate','deathdate'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.