write_spss {sjlabelled}R Documentation

Write data to other statistical software packages

Description

These functions write the content of a data frame to an SPSS, SAS or Stata-file.

Usage

write_spss(x, path, drop.na = FALSE)

write_stata(x, path, drop.na = FALSE, version = 14)

write_sas(x, path, drop.na = FALSE)

Arguments

x

A data frame that should be saved as file.

path

File path of the output file.

drop.na

Logical, if TRUE, tagged NA values with value labels will be converted to regular NA's. Else, tagged NA values will be replaced with their value labels. See 'Examples' and get_na.

version

File version to use. Supports versions 8-14.

Note

You don't need to take care whether variables have been imported with the read_* function from this package or from haven or even the foreign package, or if you have imported data and created new variables. These functions do all necessary data preparation to write a properly labelled data file.


[Package sjlabelled version 1.0.8 Index]