Export data into a .csv-file
This function restructures and exports single-case data into a .csv-file.
writeSC(data, filename = NULL, sep = ",", dec = ".", ...)
data |
A single-case data frame. See |
filename |
A character string defining the output file name (e.g.
|
sep |
The field separator string. Values within rows will be separated
by this string. Default is |
dec |
The string used for decimal points. Must be a single character.
Default is |
... |
Further arguments passed to write.table. |
Juergen Wilbert
## Not run: ## Write single-case data to a .csv-file jessica <- rSC(design_rSC(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 = ",") ## writeSC and readSC filename <- file.path(tempdir(), "test.csv") writeSC(exampleA1B1A2B2_zvt, filename) dat <- readSC(filename, cvar = "case", pvar = "part", dvar = "zvt", mvar = "day") res1 <- describeSC(exampleA1B1A2B2_zvt)$descriptives res2 <- describeSC(dat)$descriptives identical(res1,res2) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.