write_spss2 {eatGADS}R Documentation

Write a GADSdat object to txt and SPSS syntax

Description

Write a GADSdat object to a text file (txt) and an accompanying SPSS syntax file containing all meta information (e.g. value and variable labels).

Usage

write_spss2(
  GADSdat,
  txtPath,
  spsPath = NULL,
  savPath = NULL,
  dec = ".",
  fileEncoding = "UTF-8",
  chkFormat = TRUE,
  ...
)

Arguments

GADSdat

A GADSdat object.

txtPath

Path of .txt file to write, including file name and ending .txt. No default.

spsPath

Path of .sps file to write, including file name and ending .sps. Default Path is txtPath.

savPath

Path of .sav file to write, including file name and ending .sav. Default Path is spsPath.

dec

Decimal delimiter for your SPSS version. Other values for dec than "," or "." are not implemented yet.

fileEncoding

Data file encoding for SPSS. Default is "UTF-8".

chkFormat

Whether format checks via checkFormat should be performed.

...

Arguments to pass to checkFormat in particular changeFormat=FALSE if needed.

Details

This function is based on eatPreps writeSpss function and is currently under development.

Value

Writes a txt and an sav file to disc, returns nothing.

Examples


# write to spss
tmp_txt <- tempfile(fileext = ".txt")
write_spss2(pisa, txtPath = tmp_txt)


[Package eatGADS version 1.1.0 Index]