get.spss.file: get.spss.file

Description Usage Arguments Value Author(s)

Description

Import a SPSS data base to a data base in format Dataset.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
get.spss.file(
  file,
  datadir, 
  variables = NULL,
  tsvar = character(0),
  ovar = character(0),
  wvar = character(0),
  use.coding.order = "increasing",
  max.value.labels = Inf,
  savingName = NULL,
  lowernames = TRUE,
  name = NULL,
  description = character(0),
  exportPDF = TRUE,
  reencode = "latin1"
)

Arguments

file

the full name of the file you want to import.

datadir

the directory where your SPSS file is. If missing the working directory is used.

variables

the list of variables you want to import. If missing all variables in the SPSS file are imported.

tsvar

a vector containing the names of variables having to be converted in the TimestampVariable type. The SPSS timestamp origin "1582-10-14" is used to set the origin of the time variable.

ovar

a vector containing the names of variables having to be converted in the OrdinalVariable type.

wvar

a vector containing the names of variables having to be converted in the WeightingVariable type.

use.coding.order

a character, either "increasing", "decreasing", "default". If "increasing" the coding order is used to sort the order in the values of the Variable. If "decreasing" the order is in a decreasing way. If "default" no sorting is performed. Default is "increasing".

max.value.labels

depreciated. Will be soon removed.

savingName

a character. By setting this argument you produce an export in .Rdata of the SPSS file with the name given.

lowernames

a logical. If TRUE all names are set in lower case.

name

a character. The name of the data base. If NULL the name of the file is used.

description

a character. A description of the database.

exportPDF

a logical. If TRUE the summary in PDF of the data base is created.

reencode

a logical: should character strings be re-encoded to the current locale. Default is TRUE. Alternatively character, specifying an encoding to assume.

Value

A Dataset object containing your SPSS data base.

Author(s)

Emmanuel Rousseaux


Rsocialdata0 documentation built on May 2, 2019, 5:55 p.m.