outCSV | R Documentation |
Exports output from block
or assignment
to a set of .csv files using write.csv
.
outCSV(block.obj, namesCol = NULL, file.names = NULL, digits = 2, ...)
block.obj |
A list of dataframes, such as output from |
namesCol |
An optional character vector of column names to be used in output files. |
file.names |
An optional character vector of file names specifying the output file names. |
digits |
An integer representing the number of decimal places to which to round multivariate distances in output files, passed to |
... |
Additional arguments passed to |
Under the default (file.names = NULL
), each file is named “GroupXXX.csv”, where “XXX” is the group name taken from the input object.
A set of .csv files, one for each element of the input list of blocked or assigned units, written by write.csv()
.
Ryan T. Moore
outTeX
, write.csv
, block
, assignment
data(x100)
# Block and assign:
out <- block(x100, groups = "g", n.tr = 2, id.vars = "id", block.vars = c("b1", "b2"))
assg <- assignment(out, seed = 123)
# create three .csv files of blocks
## Not run: outCSV(out)
# create three .csv files of assigned blocks
# (note: overwrites blocked .csv files)
## Not run: outCSV(assg)
# create three .csv files with custom file names
## Not run: outCSV(assg, file.names = c("file1", "file2", "file3"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.