Learn R Programming

compareGroups (version 0.1-3)

export2csv: Exporting descriptives table to plain text (CSV) format

Description

This function takes the result of createTable and exports the tables to plain text (CSV) format.

Usage

export2csv(x, file, sep=",", ...)

Arguments

x
an object of class 'createTable'
file
file where table in CSV format will be written. Note that the the folder and the basename of the file must be written but not the extension (.csv). Also, another file with the extension '_appendix' is written with the available data table.
sep
character. The variable separator. If 'sep' is set to ',' it uses write.csv, and when is set to';' it uses write.csv2. Default value is ','.
...
other arguments passed to write.table.

See Also

createTable, export2latex

Examples

Run this code
data(myData)
ans<-compareGroups(y~.,myData)
export2csv(createTable(ans),file="c:/example/tables/table1")

Run the code above in your browser using DataLab