data(x100)
# First, block
out <- block(x100, groups = "g", n.tr = 2, id.vars = c("id"), block.vars
= c("b1", "b2"), algorithm="optGreedy", distance =
"mahalanobis", level.two = FALSE, valid.var = "b1",
valid.range = c(0,500), verbose = TRUE)
# Second, assign
assg <- assignment(out, seed = 123)
# create three .tex files of blocks
if (FALSE) outTeX(out)
# create three .tex files of assigned blocks
# (note: overwrites blocked .tex files)
if (FALSE) outTeX(assg)
# create three .tex files with custom file names and captions
if (FALSE) outTeX(assg, file.names = list("file1", "file2", "file3"),
captions = list("This is caption 1.", "Caption 2.", "Caption 3?"))
Run the code above in your browser using DataLab