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
if (FALSE) outCSV(out)
# create three .csv files of assigned blocks
# (note: overwrites blocked .csv files)
if (FALSE) outCSV(assg)
# create three .csv files with custom file names
if (FALSE) outCSV(assg, file.names = c("file1", "file2", "file3"))
Run the code above in your browser using DataLab