Learn R Programming

blockTools (version 0.1)

outTeX: Export blocked or assigned data to .tex format files

Description

Exports output from block or assignment to a set of .tex files using xtable.

Usage

outTeX(block.obj, namesCol = NULL, digits = 2, ...)

Arguments

block.obj
a list of dataframes, such as output from block or assignment.
namesCol
an optional vector of column names to be used in output files.
digits
the number of digits to which to round multivariate distances in output files.
...
additional arguments passed to write.tex.

Value

  • A set of .tex files, one for each element of the input list of blocked or assigned units. Each file is named ``GroupXXX.tex", where ``XXX" is the group name taken from the input object. The tables in these .tex files can easily be integrated into an existing .tex document using code GroupXXX.

    [object Object]

    outCSV, block, assignment 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 outTeX(out) ## create three .tex files of assigned blocks ## (note: overwrites blocked .tex files) outTeX(assg) design IO