Learn R Programming

scan (version 0.20)

writeSC: Export data into a .csv-file

Description

This function restructures and exports single-case data into a .csv-file.

Usage

writeSC(dat, filename = "", sep = ",", dec = ".", ...)

Arguments

dat

A single-case data frame or a list of single-case data frames. See makeSCDF to learn about this format.

filename

A character string defining the output file name (e.g. "SC_data.csv".

sep

The field separator string. Values within rows will be separated by this string. Default is sep = ",".

dec

The string used for decimal points. Must be a single character. Default is dec = "."

Further arguments passed to write.table.

See Also

write.table, readSC, makeSCDF

Examples

Run this code
# NOT RUN {
## Write single-case data to a .csv-file
jessica <- rSC(d.level = .5)
writeSC(jessica, "SCdata_Jessica.csv")

## Write multiple cases to a .csv-file with semicolon as field and comma as decimal separator
writeSC(Grosche2011, "MBDdata_Grosche.csv", sep = ";", dec = ",")
# }

Run the code above in your browser using DataLab