data.frame2txt: Export a data.frame and create scripts to input the data...

View source: R/dataframe2txt.R

data.frame2txtR Documentation

Export a data.frame and create scripts to input the data again.

Description

Export a data.frame to a tab delimited text and create R and SPSS/PSPP scripts to input the data again.

Usage

data.frame2txt(x, datafile = "x.txt", r.codefile = "x.R",
               sps.codefile = "x.sps", df.name = "x",
               user.missing)

Arguments

x

The data.frame to be exported.

datafile

The name of the tab delimited file to be created.

r.codefile

The name of the R script to read the data file.

sps.codefile

The name of the SPSS/PSPP script to read the data file.

df.name

The name of the data.frame object to be created by the R script.

user.missing

Labels of levels that must be coded as user missing in the sps script.

Details

Logical vectors are converted into numeric before being saved.

Value

The return value of write.table.

Author(s)

Jakson A. Aquino jalvesaq@gmail.com

Examples

## Not run: 
data(CO2)
data.frame2txt(CO2)

## End(Not run)

descr documentation built on Nov. 28, 2023, 1:10 a.m.