powered by
GADSdat
txt
SPSS
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).
write_spss2( GADSdat, txtPath, spsPath = NULL, savPath = NULL, dec = ".", fileEncoding = "UTF-8", chkFormat = TRUE, ... )
Writes a txt and an sav file to disc, returns nothing.
sav
A GADSdat object.
Path of .txt file to write, including file name and ending .txt. No default.
.txt
Path of .sps file to write, including file name and ending .sps. Default Path is txtPath.
.sps
txtPath
Path of .sav file to write, including file name and ending .sav. Default Path is spsPath.
.sav
spsPath
Decimal delimiter for your SPSS version. Other values for dec than "," or "." are not implemented yet.
dec
","
"."
Data file encoding for SPSS. Default is "UTF-8".
"UTF-8"
Whether format checks via checkFormat should be performed.
checkFormat
Arguments to pass to checkFormat in particular changeFormat=FALSE if needed.
changeFormat=FALSE
This function is based on eatPreps writeSpss function and is currently under development.
eatPreps
writeSpss
# write to spss tmp_txt <- tempfile(fileext = ".txt") write_spss2(pisa, txtPath = tmp_txt)
Run the code above in your browser using DataLab